• Public
  • Public/Protected
  • All

Interface DbCreateOptions


  • DbCreateOptions



Optional authSource

authSource: string

If the database authentication is dependent on another databaseName.

Optional bufferMaxEntries

bufferMaxEntries: number

Sets a cap on how many operations the driver will buffer up before giving up on getting a working connection, default is -1 which is unlimited.

Optional forceServerObjectId

forceServerObjectId: boolean

Force server to assign _id values instead of driver.

Optional ignoreUndefined

ignoreUndefined: boolean

Specify if the BSON serializer should ignore undefined fields.

Optional j

j: boolean

Specify a journal write concern.

Optional native_parser

native_parser: boolean

The current value of the parameter native_parser.

Optional pkFactory

pkFactory: Object

A primary key factory object for generation of custom _id keys.

Optional promiseLibrary

promiseLibrary: Object

A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible.

Optional promoteLongs

promoteLongs: boolean

Promotes Long values to number if they fit inside the 53 bits resolution.

Optional raw

raw: boolean

Return document results as raw BSON buffers.

Optional readConcern

readConcern: ReadConcern

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

Optional readPreference

readPreference: ReadPreference | string

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

Optional serializeFunctions

serializeFunctions: boolean

Serialize functions on any object.

Optional w

w: number | string

The write concern.

Optional wtimeout

wtimeout: number

The write concern timeout.

Generated using TypeDoc