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.有关特定方法的详细信息,包括语法和示例,请单击该方法参考页面的链接。

Name名称Description描述
Binary.createFromBase64()Creates a binary object from a base64 value.从base64值创建二进制对象。
Binary.createFromHexString()Creates a binary object from a hexadecimal value.从十六进制值创建二进制对象。
BinData()Returns a binary data object.返回一个二进制数据对象
BSONRegExp()Creates a BSONRegExp().创建BSONRegExp()
BulkWriteResult()Wrapper around the result set from Bulk.execute().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
ObjectId.createFromBase64()Creates an ObjectId from a base64 value.从base64值创建ObjectId
ObjectId.createFromHexString()Creates an ObjectId from a hexadecimal value.从十六进制值创建ObjectId
ObjectId.getTimestamp()Returns the timestamp portion of an ObjectId.返回ObjectId的时间戳部分。
ObjectId.toString()Returns the string representation of an ObjectId.返回ObjectId的字符串表示形式。
UUID() (mongosh method方法)Converts a 32-byte hexadecimal string to the UUID BSON subtype.将32字节的十六进制字符串转换为UUID BSON子类型。
WriteResult()Wrapper around the result set from write methods.围绕写入方法的结果集进行包装。