Session
final class Session (View source)
Class Session
Constants
TRANSACTION_NONE
Since: 1.7.0
|
|
TRANSACTION_STARTING
Since: 1.7.0
|
|
TRANSACTION_IN_PROGRESS
Since: 1.7.0
|
|
TRANSACTION_COMMITTED
Since: 1.7.0
|
|
TRANSACTION_ABORTED
Since: 1.7.0
|
|
Methods
No description
Aborts a transaction
Advances the cluster time for this session
Advances the operation time for this session
No description
This method closes an existing session. If a transaction was associated with this session, this transaction is also aborted, and all its operations are rolled back.
Returns the cluster time for this session
Returns the logical session ID for this session
Returns the operation time for this session, or NULL if the session has no operation time
Returns the server to which this session is pinned, or NULL if the session is not pinned to any server.
Returns options for the current transactions, or NULL if no transaction is running.
Returns the current transaction state
Returns whether the session has been marked as dirty
Returns whether a multi-document transaction is in progress.
Starts a transaction
Details
final
__wakeup()
No description
final void
abortTransaction()
Aborts a transaction
final void
advanceClusterTime(array|object $clusterTime)
Advances the cluster time for this session
final void
advanceOperationTime(TimestampInterface $operationTime)
Advances the operation time for this session
final void
commitTransaction()
No description
final void
endSession()
This method closes an existing session. If a transaction was associated with this session, this transaction is also aborted, and all its operations are rolled back.
final object|null
getClusterTime()
Returns the cluster time for this session
final object
getLogicalSessionId()
Returns the logical session ID for this session
final Timestamp|null
getOperationTime()
Returns the operation time for this session, or NULL if the session has no operation time
final Server|null
getServer()
Returns the server to which this session is pinned, or NULL if the session is not pinned to any server.
final array|null
getTransactionOptions()
Returns options for the current transactions, or NULL if no transaction is running.
final string
getTransactionState()
Returns the current transaction state
final bool
isDirty()
Returns whether the session has been marked as dirty
final bool
isInTransaction()
Returns whether a multi-document transaction is in progress.
final void
startTransaction(array|null $options = null)
Starts a transaction