bson_context_t3
BSON OID Generation Context
Overview
The bson_context_t structure is context for generation of BSON Object IDs. This context allows overriding behavior of generating ObjectIDs. The flags BSON_CONTEXT_NONE, BSON_CONTEXT_THREAD_SAFE, and BSON_CONTEXT_DISABLE_PID_CACHE are the only ones used. The others have no effect.
Examples
#include <bson/bson.h>
int
main (int argc, char *argv[])
{
bson_context_t *ctx = NULL;
bson_oid_t oid;
/* use default context, via bson_context_get_default() */
bson_oid_init (&oid, NULL);
/* specify a local context for additional control */
ctx = bson_context_new (BSON_CONTEXT_NONE);
bson_oid_init (&oid, ctx);
bson_context_destroy (ctx);
return 0;
}
History
- Debian 13 (Trixie): the text shown here
- Debian 12 (Bookworm)
- Debian 11 (Bullseye)
- Debian 10 (Buster)
- Debian 9 (Stretch)