|
|
|
|
|
MongoExecuteOperations (Function) In french: MongoExécuteLotOpérations Performs MongoDB write operations in bulk. This allows you to avoid network latency issues you would encounter if you performed the operations individually. gclCollection is mongoCollection
tabOp is array of mongoOperation
opAjout1 is mongoOperationAdd
opAjout1.Document = doc1
tabOp.Add(opAjout1)
opAjout2 is mongoOperationAdd
opAjout2.Document = doc2
tabOp.Add(opAjout2)
opModifie is mongoOperationUpdateAll
opModifie.Filter = "{ ""Nom"": ""SMITH"" }"
opModifie.Update = "{ ""$set"": { ""Nom"": ""PAULSON"" } }"
tabOp.Add(opModifie)
opSupprime is mongoOperationDeleteAll
opSupprime.Filter = "{ ""Prenom"": ""Robert"" }"
MongoExecuteOperations(gclCollection, tabOp)
Syntax
<Result> = MongoExecuteOperations(<Collection> , <Operations> [, <Execution option> [, <Level of acknowledgment>]])
<Result>: Variant or JSON Details of the completed operations. <Collection>: mongoCollection variable Name of the mongoCollection variable that represents the collection in which the operations must be performed. <Operations>: Array of mongoOperation variables Array of mongoOperation variables. This array contains the variables corresponding to the operations to be performed in bulk: These write operations will be performed in bulk. <Execution option>: Optional mongoOperationsOption variable Name of the mongoOperationsOption variable that corresponds to the options of the bulk operations. <Level of acknowledgment>: Optional mongoWriteConcern variable Name of the mongoWriteConcern variable used to specify the level of acknowledgement requested for bulk operations.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|