(command: Document)
| 1086 | * @internal |
| 1087 | */ |
| 1088 | export 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 |