DOKK / manpages / debian 11 / libbson-doc / bson_oid_init_sequence.3.en
BSON_OID_INIT_SEQUENCE(3) libbson BSON_OID_INIT_SEQUENCE(3)

bson_oid_init_sequence - bson_oid_init_sequence()

void
bson_oid_init_sequence (bson_oid_t *oid,

bson_context_t *context) BSON_GNUC_DEPRECATED;


  • oid: A bson_oid_t.
  • context: An optional bson_context_t.

Generates a new ObjectID with the next 64-bit sequence number in context. The first 4 bytes contain the current time and the following 8 contain the sequence number in big-endian format.

The bson_oid_t generated by this function is not guaranteed to be globally unique. Only unique within this context. It is however, guaranteed to be sequential.

WARNING:

DEPRECATED: This function provides no additional value compared to bson_oid_init. It will be removed in libbson 2.0.


MongoDB, Inc

2017-present, MongoDB, Inc

June 4, 2021 1.17.6