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

Function makeCursor

test/integration/crud/crud_api.test.ts:229–243  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

227 });
228
229 const makeCursor = () => {
230 // Possible methods on the the cursor instance
231 return collection
232 .find({})
233 .filter({ a: 1 })
234 .addCursorFlag('noCursorTimeout', true)
235 .addQueryModifier('$comment', 'some comment')
236 .batchSize(1)
237 .comment('some comment 2')
238 .limit(2)
239 .maxTimeMS(50)
240 .project({ a: 1 })
241 .skip(0)
242 .sort({ a: 1 });
243 };
244
245 describe('#count()', () => {
246 it('returns the number of documents', async () => {

Callers 1

crud_api.test.tsFile · 0.70

Calls 11

commentMethod · 0.80
addQueryModifierMethod · 0.80
addCursorFlagMethod · 0.80
sortMethod · 0.45
skipMethod · 0.45
projectMethod · 0.45
maxTimeMSMethod · 0.45
limitMethod · 0.45
batchSizeMethod · 0.45
filterMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected