1BSON_APPEND_DBPOINTER(3) libbson BSON_APPEND_DBPOINTER(3)
2
3
4
6 #define BSON_APPEND_DBPOINTER(b, key, coll, oid) \
7 bson_append_dbpointer (b, key, (int) strlen (key), coll, oid)
8
9 bool
10 bson_append_dbpointer (bson_t *bson,
11 const char *key,
12 int key_length,
13 const char *collection,
14 const bson_oid_t *oid);
15
17 • bson: A bson_t.
18
19 • key: An ASCII C string containing the name of the field.
20
21 • key_length: The length of key in bytes, or -1 to determine the length
22 with strlen().
23
24 • collection: The target collection name.
25
26 • oid: The target document identifier.
27
29 WARNING:
30 The dbpointer field type is DEPRECATED and should only be used when
31 interacting with legacy systems.
32
34 Returns true if the operation was applied successfully. The function
35 will fail if appending the array grows bson larger than INT32_MAX.
36
38 MongoDB, Inc
39
41 2017-present, MongoDB, Inc
42
43
44
45
461.25.1 Nov 08, 2023 BSON_APPEND_DBPOINTER(3)