number | string null optional - The write concern.
number null optional - The write concern timeout.
boolean false optional - Specify a journal write concern.
boolean false optional - Return document results as raw BSON buffers.
object null optional - A primary key factory object for generation of custom _id keys.
ReadPreference | string null optional - The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
boolean false optional - Serialize functions on any object.
boolean false optional - Returns an error if the collection does not exist
boolean false optional - Create a capped collection.
boolean true optional - Create an index on the _id field of the document, True by default on MongoDB 2.2 or higher off for version < 2.2.
number null optional - The size of the capped collection in bytes.
number null optional - The maximum number of documents in the capped collection.
number null optional - Optional. Available for the MMAPv1 storage engine only to set the usePowerOf2Sizes and the noPadding flag.
object null optional - Allows users to specify configuration to the storage engine on a per-collection basis when creating a collection on MongoDB 3.0 or higher.
object null optional - Allows users to specify validation rules or expressions for the collection. For more information, see Document Validation on MongoDB 3.2 or higher.
string null optional - Determines how strictly MongoDB applies the validation rules to existing documents during an update on MongoDB 3.2 or higher.
string null optional - Determines whether to error on invalid documents or just warn about the violations but allow invalid documents to be inserted on MongoDB 3.2 or higher.
object null optional - Allows users to specify a default configuration for indexes when creating a collection on MongoDB 3.2 or higher.
string null optional - The name of the source collection or view from which to create the view. The name is not the full namespace of the collection or view; i.e. does not include the database name and implies the same database as the view to create on MongoDB 3.4 or higher.
array null optional - An array that consists of the aggregation pipeline stage. create creates the view by applying the specified pipeline to the viewOn collection or view on MongoDB 3.4 or higher.
object null optional - Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
boolean true optional - Create an index on the _id field of the document, True by default on MongoDB 2.2 or higher off for version < 2.2.
boolean false optional - Create a capped collection.
object null optional - Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).
number null optional - Optional.
number null optional - Optional. Available for the MMAPv1 storage engine only to set the usePowerOf2Sizes and the noPadding flag.
object null optional - Allows users to specify a default configuration for indexes when creating a collection on MongoDB 3.2 or higher.
boolean false optional - Specify a journal write concern.
number null optional - The maximum number of documents in the capped collection.
array null optional - An array that consists of the aggregation pipeline stage.
array null optional - An array that consists of the aggregation pipeline stage. create creates the view by applying the specified pipeline to the viewOn collection or view on MongoDB 3.4 or higher.
object null optional - A primary key factory object for generation of custom _id keys.
boolean false optional - Return document results as raw BSON buffers.
ReadPreference | string null optional - The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
boolean false optional - Serialize functions on any object.
number null optional - The size of the capped collection in bytes.
object null optional - Allows users to specify configuration to the storage engine on a per-collection basis when creating a collection on MongoDB 3.0 or higher.
boolean false optional - Returns an error if the collection does not exist
string null optional - Determines whether to error on invalid documents or just warn about the violations but allow invalid documents to be inserted on MongoDB 3.2 or higher.
string null optional - Determines how strictly MongoDB applies the validation rules to existing documents during an update on MongoDB 3.2 or higher.
object null optional - Allows users to specify validation rules or expressions for the collection.
object null optional - Allows users to specify validation rules or expressions for the collection. For more information, see Document Validation on MongoDB 3.2 or higher.
string null optional - The name of the source collection or view from which to create the view.
string null optional - The name of the source collection or view from which to create the view. The name is not the full namespace of the collection or view; i.e. does not include the database name and implies the same database as the view to create on MongoDB 3.4 or higher.
number | string null optional - The write concern.
number null optional - The write concern timeout.
Mongo Collection Retrieval Options