This code allows us to connect to the database Not sure how this works exactly, but it works
This function deletes an object or objects that match the filterValues
These are the values we will search by to delete objects Value should only be an id or a unique value unless we want to do a bulk delete
this is the puzzle schema which dictates the collection as well as the Mongoose schema that will be used to upload our object
This function searches for objects with the $and operator
this provides the parameters with which we can search for puzzles to retrieve
this is the puzzle schema which dictates the collection as well as the Mongoose schema that will be used to upload our object
This function updates or patches an object or objects with the replaceCriteria
This is the criteria we use to select the objects we need to update
This is the values that we will replace inside the object, leaving the remaining values untouched
this is the puzzle schema which dictates the collection as well as the Mongoose schema that will be used to upload our object
This function uploads an array of objects to the database ordered: false means that the function will attempt to upload all objects instead of stopping at failure
this is the input object which will be uploaded to the database
this is the puzzle schema which dictates the collection as well as the Mongoose schema that will be used to upload our object
Generated using TypeDoc
This is the database service file This is the last step in the process and where we get the query results The functions here are GENERIC and are designed to work with all endpoints More functions can be added if additional functionality is needed The five functions are connectToDB queryUpload, querySearchAND, queryUpdate, and queryDeleteAND Any errors will be caught by our try/catch block in our controller