| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
MongoDB.BulkOperation.Insert
Queue an insert of a single document into a bulk operation.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| MongoDB | 16.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "MongoDB.BulkOperation.Insert"; MongoDBRef; documentJSON { ; OptionsJSON } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| MongoDBRef | The reference number for the mongo connection. | $MongoDB | |
| documentJSON | The JSON with the record to save. | ||
| OptionsJSON | The options to use. | Optional |
Result
Returns OK or error.
Description
Queue an insert of a single document into a bulk operation.The insert is not performed until MongoDB.BulkOperation.Execute is called.
Examples
Insert a record to the operation:
Set Variable [ $r ; Value: MBS( "MongoDB.BulkOperation.Insert"; $Mongo; JSONSetElement ( "{}"; ["First"; "Dave"; JSONString]; ["Last"; "Daniels"; JSONString] )) ]
See also
- MongoDB.BulkOperation.Close
- MongoDB.BulkOperation.Create
- MongoDB.BulkOperation.Execute
- MongoDB.BulkOperation.GetComment
- MongoDB.BulkOperation.GetLet
- MongoDB.BulkOperation.RemoveOne
- MongoDB.BulkOperation.SetComment
- MongoDB.BulkOperation.SetLet
- MongoDB.BulkOperation.UpdateOne
Example Databases
Blog Entries
This function checks for a license.
Created 9th August 2026, last changed 21st October 2026
MongoDB.BulkOperation.GetUsedServerId - MongoDB.BulkOperation.RemoveMany
MarkDown version: MongoDBBulkOperationInsert.md