ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / Big Data / Managing Mongo files
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Performs MongoDB write operations in bulk. This allows you to avoid network latency issues you would encounter if you performed the operations individually.
Example
gclCollection is mongoCollection
arrOp is array of mongoOpération
opAdd1 is mongoOperationAdd
opAdd1.Document = doc1
arrOp.Add(opAdd1)
opAdd2 is mongoOperationAdd
opAdd2.Document = doc2
arrOp.Add(opAdd2)
opUpdate is mongoOperationUpdateAll
opUpdate.Filter = "{ ""LastName"": ""SMITH"" }"
opUpdate.Update = "{ ""$set"": {""Name"": ""PAULSON"" } }"
arrOp.Add(opUpdate)
opDelete is mongoOperationDeleteAll
opDelete.Filter = "{ ""FirstName"": ""Robert"" }"
MongoExecuteOperations(gclCollection, arrOp)
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.
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/17/2023

Send a report | Local help