SYNOPSIS

#include <bson.h>

bool
bson_append_oid (bson_t           *bson,
                 const char       *key,
                 int               key_length,
                 const bson_oid_t *value);

DESCRIPTION

The bson_append_oid() function shall append a new element to bson of type BSON_TYPE_OID. oid MUST be a pointer to a bson_oid_t.

If key is NULL terminated, -1 may be passed for key_length.

RETURN VALUE

TRUE if successful. Otherwise FALSE and no modifications are made to bson.

ERRORS

FALSE is returned if there was insufficient space to append the element.

SEE ALSO

AUTHORS

This page was written by MongoDB, Inc.