Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MongoDB.Command

Execute a command on the server.

Component Version macOS Windows Linux Server iOS SDK
MongoDB 13.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "MongoDB.Command"; MongoDBRef; Command { ; Options } )   More

Parameters

Parameter Description Example Flags
MongoDBRef The reference number for the mongo connection. $MongoDB
Command The command as JSON. "{ \"hello\": 1 }"
Options JSON with options. Optional

Result

Returns JSON or error.

Description

Execute a command on the server.
Please open relevant collection first with MongoDB.OpenCollection.
Consult the MongoDB Manual entry on Database Commands for each command’s arguments.

Examples

Run Hello command:

Set Variable [ $json ; Value: MBS( "MongoDB.Command"; $Mongo; "{ \"hello\": 1 }") ]
Show Custom Dialog [ "Record" ; $json ]

See also

Release notes

Example Databases

Blog Entries

Created 3th February 2023, last changed 3th February 2023


MongoDB.CollectionNames - MongoDB.CommitTransaction