Functions
These are all the functions housed within the asynchronous WastefulDB module. Fundamentally they perform the same as their synchronous versions but are different in how they are formatted.
Last updated
These are all the functions housed within the asynchronous WastefulDB module. Fundamentally they perform the same as their synchronous versions but are different in how they are formatted.
Last updated
The examples listed under each function are meant to be used within an asynchronous environment. Using them without declaring await can result in data loss.
.insert()
Inserts a new document containing a single object into the default or specified directory. An error is thrown if the document identifier already exists in the directory.
.insertBulk([ ])
Inserts a new document containing an array of two or more objects. An error is thrown if the document identifier already exists in the directory.
.find()
Find a document within the default or specified directory.
.findMore([ ])
Find multiple documents within the default or specific directory in one function. If a document doesn't exist, it will be inserted into the resulting array as -1
.
.update()
Updates a document within the default or specified directory. If the document doesn't exist, an error will be thrown.
.mupdate()
Updates multiple keys in a document at the same time. Functions identically to .update()
except an array of objects is provided as an argument. The contents of each object follow the same structure as used in .update()
.
.check()
Determines if the given document exists. Returns a boolean value based on the result.