(mongodb >=1.4.0)
MongoDB\Driver\Manager::startSession — Start a new client session for use with this client
$options
] )Creates a MongoDB\Driver\Session for the given options. The session may then be specified when executing commands, queries, and write operations.
Note: A MongoDB\Driver\Session can only be used with the MongoDB\Driver\Manager from which it was created.
options
Option | Type | Description | Default |
---|---|---|---|
causalConsistency | boolean |
Configure causal consistency in a session. If See » Casual Consistency in the MongoDB manual for more information. |
TRUE |
Returns a MongoDB\Driver\Session.