.\" Man page generated from reStructuredText .\" by the Docutils 0.23 manpage writer. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "MONGOC_CLIENT_SESSION_GET_SNAPSHOT_TIME" "3" "Aug 27, 2026" "2.5.1" "libmongoc" .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX bool mongoc_client_session_get_snapshot_time (const mongoc_client_session_t *session, uint32_t *timestamp, uint32_t *increment, bson_error_t *error); .EE .UNINDENT .UNINDENT .sp Get the session\(aqs snapshot time, expressed as a BSON Timestamp with timestamp and increment components. The snapshot time is either the value passed to mongoc_session_opts_set_snapshot_time() \%<> when the session was started, or the \fBatClusterTime\fP returned by the server on the session\(aqs first read operation (\(dqfind\(dq, \(dqaggregate\(dq or \(dqdistinct\(dq). .sp Calling this function on a session that was not started with mongoc_session_opts_set_snapshot() \%<> set to true is an error. If the session is a snapshot session but no snapshot time has been established yet (no read operation has completed and no snapshot time was configured), this function returns false without setting \fBerror\fP\&. .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBsession\fP: A mongoc_client_session_t \%<>\&. .IP \(bu 2 \fBtimestamp\fP: A pointer to a \fBuint32_t\fP to receive the timestamp component. .IP \(bu 2 \fBincrement\fP: A pointer to a \fBuint32_t\fP to receive the increment component. .IP \(bu 2 \fBerror\fP: An optional location for a \fBbson_error_t\fP \%, or \fBNULL\fP\&. .UNINDENT .SH RETURNS .sp Returns true and populates \fBtimestamp\fP and \fBincrement\fP if the snapshot time is available. Returns false otherwise, setting \fBerror\fP if the session is not a snapshot session. .SH Author MongoDB, Inc .SH Copyright 2009-present, MongoDB, Inc. .\" End of generated man page.