Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
MongoDB.StartTransaction
Start a multi-document transaction for all following operations in this session.
Component |
Version |
macOS |
Windows |
Linux |
Server |
iOS SDK |
MongoDB
|
12.5 |
✅ Yes |
✅ Yes |
✅ Yes |
✅ Yes |
✅ Yes |
MBS( "MongoDB.StartTransaction"; MongoDBRef )
More
MBS(
"MongoDB.StartTransaction"; /* Start a multi-document transaction for all following operations in this session. */
$MongoDBRef) /* The reference number for the mongo connection.e.g. $MongoDB */
Less
Parameters
Parameter |
Description |
Example |
MongoDBRef |
The reference number for the mongo connection. |
$MongoDB |
Result
Returns OK or error.
Description
Start a multi-document transaction for all following operations in this session.
The transaction must be completed with CommitTransaction or AbortTransaction. An in-progress transaction is automatically aborted by destructor.
Raises exception if there are invalid arguments, such as a session with a transaction already in progress.
If you run MongoDB server locally, you may need to configure a replication. Otherwise you get an error like this: "Error 17:20: Transaction numbers are only allowed on a replica set member or mongos".
See also
Release notes
Example Databases
Blog Entries
This function checks for a license.
Created 23th September 2022, last changed 24th September 2022
MongoDB.SetUserName
-
MongoDB.TextToBinary