class Mongo::Session::ClientSession

Overview

A client session used to logically bind operations together.

Defined in:

cryomongo/sessions.cr

Instance Method Summary

Instance Method Detail

def advance_cluster_time(cluster_time : ClusterTime) #

This method advances the cluster_time.

NOTE this method is a no-op if the provider cluster time is less than the current cluster time.


[View source]
def advance_operation_time(operation_time : BSON::Timestamp) #

This method advances the operation_time.

NOTE this method is a no-op if the provider operation time is less than the current operation time.


[View source]
def cluster_time : ClusterTime | Nil #

This property returns the most recent cluster time seen by this session. If no operations have been executed using this session this value will be null unless advanceClusterTime has been called. This value will also be null when a cluster does not report cluster times.


[View source]
def end #

Terminate the session and return it to the pool.


[View source]
def operation_time : BSON::Timestamp | Nil #

This property returns the operation time of the most recent operation performed using this session. If no operations have been performed using this session the value will be null unless advanceOperationTime has been called. This value will also be null when the cluster does not report operation times.


[View source]
def options : Options #

The session options used when creating the session.


[View source]