1MONGOC_URI_GET_COMPRESSORS(3)      libmongoc     MONGOC_URI_GET_COMPRESSORS(3)
2
3
4

NAME

6       mongoc_uri_get_compressors - mongoc_uri_get_compressors()
7

SYNOPSIS

9          const bson_t *
10          mongoc_uri_get_compressors (const mongoc_uri_t *uri);
11

PARAMETERS

13uri: A mongoc_uri_t.
14

DESCRIPTION

16       Returns  a bson document with the enabled compressors as the keys or an
17       empty document if no compressors were provided.
18

EXAMPLE

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

RETURNS

30       A bson_t * which should not be modified or freed.
31

AUTHOR

33       MongoDB, Inc
34
36       2017-present, MongoDB, Inc
37
38
39
40
411.20.0                           Nov 18, 2021    MONGOC_URI_GET_COMPRESSORS(3)
Impressum