MCPcopy Create free account
hub / github.com/documentdb/documentdb / PgbsonGenerateOidDocument

Function PgbsonGenerateOidDocument

pg_documentdb_core/include/io/pgbson.h:154–161  ·  view source on GitHub ↗

* Generate a new ObjectID document. * e.g, { "" : ObjectId("5f3e3b3b1d9f3b0001f3b3b1")} */

Source from the content-addressed store, hash-verified

152 * e.g, { "" : ObjectId("5f3e3b3b1d9f3b0001f3b3b1")}
153 */
154static inline pgbson *
155PgbsonGenerateOidDocument()
156{
157 bson_value_t objectidValue;
158 objectidValue.value_type = BSON_TYPE_OID;
159 bson_oid_init(&(objectidValue.value.v_oid), NULL);
160 return BsonValueToDocumentPgbson(&objectidValue);
161}
162
163
164#endif

Callers 1

Calls 1

Tested by

no test coverage detected