Mongodb integration
suggest changeSyntax
Driver 4 and later drop the callback and return a promise. The option name is serializeFunctions.
db.collection.insertOne(document, options)db.collection.insertMany(documents, options)db.collection.find(query)db.collection.updateOne(filter, update, options)db.collection.updateMany(filter, update, options)db.collection.deleteOne(filter, options)db.collection.deleteMany(filter, options)
Parameters
| Parameter | Details |
|---|---|
| document | A JavaScript object representing one document |
| documents | An array of documents |
| query | An object defining a search query |
| filter | An object selecting which documents to update or delete |
| callback | Called when the operation finishes. Removed in driver 4. |
| options | Optional settings. The default is null. |
| w | Write concern |
| wtimeout | Write-concern timeout. The default is null. |
| j | Journal write concern. The default is false. |
| upsert | Insert the document when no document matches. For updates. The default is false. |
| serializeFunctions | Serialize functions stored on the document. The default is false. |
| forceServerObjectId | Let the server assign _id. The default is false. |
| bypassDocumentValidation | Skip schema validation on MongoDB 3.2 and later. The default is false. |
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents