1MONGOC_URI_GET_COMPRESSORS(3) MongoDB C Driver MONGOC_URI_GET_COMPRESSORS(3)
2
3
4
6 mongoc_uri_get_compressors - mongoc_uri_get_compressors()
7
9 const bson_t *
10 mongoc_uri_get_compressors (const mongoc_uri_t *uri);
11
13 ยท uri: A mongoc_uri_t.
14
16 Returns a bson document with the enabled compressors as the keys if uri
17 has compressors provided, otherwise NULL.
18
20 mongoc_client_t *client;
21 mongoc_uri_t *uri;
22
23 uri = mongoc_uri_new ("mongodb://localhost/?compressors=zlib,snappy,zstd");
24
25 if (bson_has_field (mongoc_uri_get_compressors (uri), "snappy")) {
26 /* snappy enabled */
27 }
28
30 A bson_t * which should not be modified or freed.
31
33 MongoDB, Inc
34
36 2017-present, MongoDB, Inc
37
38
39
40
411.15.2 Nov 06, 2019 MONGOC_URI_GET_COMPRESSORS(3)