S

Loading…

Interface

FindOneOptions

interface FindOneOptions<TDocument extends object = Document, TProjection extends Projection<TDocument> | undefined = undefined> extends QueryBudgetOptions

Defined in packages/driver/src/collection.ts:76

Hierarchy

Properties#

P

maxTimeMS

#
readonly maxTimeMS?: number

The 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

Used by#