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

Function makeDeleteStatement

src/operations/delete.ts:146–164  ·  view source on GitHub ↗
(
  filter: Document,
  options: DeleteOptions & { limit?: number }
)

Source from the content-addressed store, hash-verified

144}
145
146export function makeDeleteStatement(
147 filter: Document,
148 options: DeleteOptions & { limit?: number }
149): DeleteStatement {
150 const op: DeleteStatement = {
151 q: filter,
152 limit: typeof options.limit === 'number' ? options.limit : 0
153 };
154
155 if (options.collation) {
156 op.collation = options.collation;
157 }
158
159 if (options.hint) {
160 op.hint = options.hint;
161 }
162
163 return op;
164}
165
166defineAspects(DeleteOperation, [
167 Aspect.RETRYABLE,

Callers 5

deleteOneMethod · 0.90
deleteMethod · 0.90
rawFunction · 0.90
constructorMethod · 0.85
constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected