MCPcopy
hub / github.com/mongodb/node-mongodb-native / advanceOperationTime

Method advanceOperationTime

src/sessions.ts:304–313  ·  view source on GitHub ↗

* Advances the operationTime for a ClientSession. * * @param operationTime - the `BSON.Timestamp` of the operation type it is desired to advance to

(operationTime: Timestamp)

Source from the content-addressed store, hash-verified

302 * @param operationTime - the `BSON.Timestamp` of the operation type it is desired to advance to
303 */
304 advanceOperationTime(operationTime: Timestamp): void {
305 if (this.operationTime == null) {
306 this.operationTime = operationTime;
307 return;
308 }
309
310 if (operationTime.greaterThan(this.operationTime)) {
311 this.operationTime = operationTime;
312 }
313 }
314
315 /**
316 * Advances the clusterTime for a ClientSession to the provided clusterTime of another ClientSession

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected