• Public
  • Public/Protected
  • All

Interface CountDocumentsOptions




Optional allowDiskUse

allowDiskUse: boolean

allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >).

Optional authdb

authdb: string

Optional batchSize

batchSize: number

The number of documents to return per batch. See aggregation documentation.

Optional bsonRegExp

bsonRegExp: boolean

return BSON regular expressions as BSONRegExp instances.

Optional bypassDocumentValidation

bypassDocumentValidation: boolean

Allow driver to bypass schema validation in MongoDB 3.2 or higher.

Optional checkKeys

checkKeys: boolean

the serializer will check if keys are valid.

Optional collation

collation: CollationOptions

Specify collation.

Optional comment

comment: string | Document

A user-provided comment to attach to this command

Optional cursor

cursor: Document

Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

Optional dbName

dbName: string

Optional explain

Specifies the verbosity mode for the explain output.

Optional fieldsAsRaw

fieldsAsRaw: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

Optional fullResponse

fullResponse: boolean

Return the full server response for the command

Optional hint

hint: Hint

Add an index selection hint to an aggregation command

Optional ignoreUndefined

ignoreUndefined: boolean

serialize will not emit undefined fields (default:true)

Optional let

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

Optional limit

limit: number

The maximum amounts to count before aborting.

Optional maxAwaitTimeMS

maxAwaitTimeMS: number

The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query.

Optional maxTimeMS

maxTimeMS: number

specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.

Optional noResponse

noResponse: boolean

Optional out

out: string

Optional promoteBuffers

promoteBuffers: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

Optional promoteLongs

promoteLongs: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits

Optional promoteValues

promoteValues: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

Optional raw

raw: boolean

Return BSON filled buffers from operations

Optional readConcern

readConcern: ReadConcernLike

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

Optional readPreference

readPreference: ReadPreferenceLike

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

Optional retryWrites

retryWrites: boolean

Should retry failed writes

Optional serializeFunctions

serializeFunctions: boolean

serialize the javascript functions (default:false).

Optional session

session: ClientSession

Specify ClientSession for this command

Optional skip

skip: number

The number of documents to skip.

Optional willRetryWrites

willRetryWrites: boolean

Optional writeConcern

Write Concern as an object

Generated using TypeDoc