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

Function commandSupportsAfterClusterTime

src/utils.ts:1088–1111  ·  view source on GitHub ↗
(command: Document)

Source from the content-addressed store, hash-verified

1086 * @internal
1087 */
1088export function commandSupportsAfterClusterTime(command: Document): boolean {
1089 // READ operations
1090 if (command.aggregate || command.count || command.distinct || command.find || command.geoNear) {
1091 return true;
1092 }
1093
1094 // WRITE operations
1095 if (
1096 command.bulkWrite ||
1097 command.create ||
1098 command.createIndexes ||
1099 command.delete ||
1100 command.drop ||
1101 command.dropDatabase ||
1102 command.dropIndexes ||
1103 command.findAndModify ||
1104 command.insert ||
1105 command.update
1106 ) {
1107 return true;
1108 }
1109
1110 return false;
1111}
1112
1113/**
1114 * Compare objectIds. `null` is always less

Callers 1

applySessionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected