Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MongodbFindOneOptions

Hierarchy

  • MongodbFindOneOptions

Index

Properties

Optional batchSize

batchSize: undefined | number

Set the batchSize for the getMoreCommand when iterating over the query results.

Optional comment

comment: undefined | string

You can put a $comment field on a query to make looking in the profiler logs simpler.

Optional explain

explain: undefined | true | false

Explain the query instead of returning the data.

Optional fields

fields: Object

The fields to return in the query. Object of fields to include or exclude (not both), {'a':1}.

Optional hint

hint: Object

Tell the query to use specific indexes in the query. Object of indexes to use, {'_id':1}.

Optional limit

limit: undefined | number

Sets the limit of documents returned in the query.

Optional max

max: undefined | number

Set index bounds.

Optional maxScan

maxScan: undefined | number

Limit the number of items to scan.

Optional maxTimeMs

maxTimeMs: undefined | number

Number of milliseconds to wait before aborting the query.

Optional min

min: undefined | number

Set index bounds.

Optional partial

partial: undefined | true | false

Specify if the cursor should return partial results when querying against a sharded system.

Optional raw

raw: undefined | true | false

Return document results as raw BSON buffers.

Optional readPreference

readPreference: ReadPreference | string

The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).

Optional returnKey

returnKey: undefined | true | false

Only return the index key.

Optional showDiskLoc

showDiskLoc: undefined | true | false

Show disk location of results.

Optional skip

skip: undefined | number

Set to skip N documents ahead in your query (useful for pagination).

Optional snapshot

snapshot: undefined | true | false

Snapshot query.

Optional sort

sort: Array<any> | Object

Set to sort the documents coming back from the query. Array of indexes, [['a', 1]] etc.

Optional tailable

tailable: undefined | true | false

Specify if the cursor is tailable.

Optional timeout

timeout: undefined | true | false

Specify if the cursor can timeout.

Generated using TypeDoc