GoLang MongoDB\Driver\Manager::startSession

request it (207)
GoLang replacement for PHP's MongoDB\Driver\Manager::startSession [edit | history]

Do you know a GoLang replacement for PHP's MongoDB\Driver\Manager::startSession? Write it!

PHP MongoDB\Driver\Manager::startSession

PHP original manual for MongoDB\Driver\Manager::startSession [ show | php.net ]


(mongodb >=1.4.0)

MongoDB\Driver\Manager::startSessionStart a new client session for use with this client


final public MongoDB\Driver\Session MongoDB\Driver\Manager::startSession ([ array $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.



Option Type Description Default
causalConsistency boolean

Configure causal consistency in a session. If TRUE, each operation in the session will be causally ordered after the previous read or write operation. Set to FALSE to disable causal consistency.

See » Casual Consistency in the MongoDB manual for more information.


Return Values

Returns a MongoDB\Driver\Session.


See Also