Docs HomeMongoDB Manual

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描述
BinData()Returns a binary data object.返回一个二进制数据对象
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.创建日期对象。默认情况下,创建一个包含当前日期的日期对象。
ObjectId()Returns an ObjectId.返回ObjectId。
ObjectId.getTimestamp()Returns the timestamp portion of an ObjectId.返回ObjectId的时间戳部分。
ObjectId.toString()Displays the string representation of an ObjectId.显示ObjectId的字符串表示形式。
ObjectId.valueOf()Displays the str attribute of an ObjectId as a hexadecimal string.将ObjectId的str属性显示为十六进制字符串。
UUID()Converts a 32-byte hexadecimal string to the UUID BSON subtype.将32字节的十六进制字符串转换为UUID BSON子类型。
WriteResult()Wrapper around the result set from write methods.包装来自写入方法的结果集。
WriteResult.hasWriteError()Returns a boolean specifying whether the results include WriteResult.writeError.返回一个布尔值,指定结果是否包括WriteResult.writeError
WriteResult.hasWriteConcernError()Returns a boolean specifying whether whether the results include WriteResult.writeConcernError.返回一个布尔值,指定结果是否包括WriteResult.writeConcernError