Database Manual / Reference / mongosh Methods

Object Constructors and Methods

Note

For details on a specific method, including syntax and examples, click on the link to the method's reference page.

NameDescription

Binary.createFromBase64()

Creates a binary object from a base64 value.

Binary.createFromHexString()

Creates a binary object from a hexadecimal value.

BinData()

Returns a binary data object.

BSONRegExp()

Creates a BSONRegExp().

BulkWriteResult()

Wrapper around the result set from Bulk.execute().

Date()

Creates a date object. By default creates a date object including the current date.

HexData()

Returns a binary data object.

ObjectId()

Returns an ObjectId.

ObjectId.createFromBase64()

Creates an ObjectId from a base64 value.

ObjectId.createFromHexString()

Creates an ObjectId from a hexadecimal value.

ObjectId.getTimestamp()

Returns the timestamp portion of an ObjectId.

ObjectId.toString()

Returns the string representation of an ObjectId.

UUID() (mongosh method)

Converts a 32-byte hexadecimal string to the UUID BSON subtype.

WriteResult()

Wrapper around the result set from write methods.