4️⃣Collection
The Collection
class is an internal class that represents a Glacier Collection.
name
The name of current collection.
insertOne
Insert a single document into current collection.
Type
Example
updateOne
Update a single document in current collection.
CAUTION
The updateOne
method replaces the value of a field with the specified value, if you specify multiple field-value pairs, it will update or create each field, this is similar to the $set
operator in MongoDB and it will never replaces the entire data record.
Type
Example
deleteOne
Delete a document from current collection.
Type
Example
find
Create a cursor for a filter that can be used to iterate over results from current collection.
Return
Type
Last updated