Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CollectionCreateOptions

Hierarchy

  • CollectionCreateOptions

Index

Properties

Optional autoIndexId

autoIndexId: boolean

Create an index on the _id field of the document, True by default on MongoDB 2.2 or higher off for version < 2.2.

Optional capped

capped: boolean

Create a capped collection.

Optional j

j: boolean

Specify a journal write concern.

Optional max

max: number

The maximum number of documents in the capped collection.

Optional pkFactory

pkFactory: Object

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

Optional raw

raw: boolean

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 serializeFunctions

serializeFunctions: boolean

Serialize functions on any object.

Optional size

size: number

The size of the capped collection in bytes.

Optional strict

strict: boolean

Returns an error if the collection does not exist.

Optional w

w: number | string

The write concern.

Optional wtimeout

wtimeout: number

The write concern timeout.

Generated using TypeDoc