Interface
FindOptions
Options for SinterCollection.find.
interface FindOptions<TDocument extends object = Document, TProjection extends Projection<TDocument> | undefined = undefined> extends QueryBudgetOptionsDefined in packages/driver/src/collection.ts:88
Hierarchy
- QueryBudgetOptions
- FindOptions
Properties#
batchSize
#readonly batchSize?: numberHow many documents the cursor fetches from the server per round trip.
Defined in packages/driver/src/collection.ts:95
limit
#readonly limit?: numberThe maximum number of documents to return.
Defined in packages/driver/src/collection.ts:104
maxScanned
#readonly maxScanned?: numberThe most documents the server may examine for the request, counting every document it reads, not only the ones it returns. An index lowers the number. A positive integer.
Inherited from QueryBudgetOptions.maxScanned
Defined in packages/driver/src/budget.ts:28
maxTimeMS
#readonly maxTimeMS?: numberThe most milliseconds the server may spend on the request. The server looks at the clock while it examines documents, so a limit can be passed by a little before the request stops, and a long sort or group is not interrupted once its documents are read. A positive integer.
This is separate from the client's requestTimeoutMS, which gives up
waiting for the answer. Keep requestTimeoutMS larger than maxTimeMS,
or the client may stop waiting first.
Inherited from QueryBudgetOptions.maxTimeMS
Defined in packages/driver/src/budget.ts:22
projection
#readonly projection?: TProjectionThe fields to return. See Projection. It is applied after sorting, so a query can sort by a field it does not return. The cursor's result type follows the projection when it is written inline.
Defined in packages/driver/src/collection.ts:110
skip
#readonly skip?: numberHow many matching documents to skip, after sorting.
Defined in packages/driver/src/collection.ts:102
sort
#readonly sort?: Sort<TDocument>Sort order as [path, direction] pairs, where direction is 1 for
ascending and -1 for descending. Earlier pairs take priority.
Defined in packages/driver/src/collection.ts:100