MongoDB\Driver\Manager
PHP Manual

MongoDB\Driver\Manager::startSession

(mongodb >=1.4.0)

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

Beschreibung

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.

Hinweis: A MongoDB\Driver\Session can only be used with the MongoDB\Driver\Manager from which it was created.

Parameter-Liste

options

options
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.

TRUE

Rückgabewerte

Returns a MongoDB\Driver\Session.

Fehler/Exceptions

Siehe auch


MongoDB\Driver\Manager
PHP Manual