1MONGOC_GRIDFS_BUCKET_NEW(3)        libmongoc       MONGOC_GRIDFS_BUCKET_NEW(3)
2
3
4

NAME

6       mongoc_gridfs_bucket_new - mongoc_gridfs_bucket_new()
7

SYNOPSIS

9          mongoc_gridfs_bucket_t *
10          mongoc_gridfs_bucket_new (mongoc_database_t *db,
11                                    const bson_t *opts,
12                                    const mongoc_read_prefs_t *read_prefs,
13                                    bson_error_t* error) BSON_GNUC_WARN_UNUSED_RESULT;
14

PARAMETERS

16db: A mongoc_database_t.
17
18opts: A bson_t or NULL
19
20read_prefs: A mongoc_read_prefs_t used for read operations or NULL to
21         inherit read preferences from db.
22
23error: A bson_error_t or NULL.
24
25       opts may be NULL or a BSON document with additional command options:
26
27bucketName: A UTF-8 string used as the prefix to the GridFS  "chunks"
28         and  "files" collections. Defaults to "fs". The bucket name, together
29         with the database and suffix collections must not exceed 120  charac‐
30         ters. See the manual for the max namespace length.
31
32chunkSizeBytes:  An  int32  representing  the chunk size. Defaults to
33         255KB.
34
35writeConcern:   Construct   a    mongoc_write_concern_t    and    use
36         mongoc_write_concern_append()  to  add the write concern to opts. See
37         the example code for mongoc_client_write_command_with_opts().
38
39readConcern:    Construct    a    mongoc_read_concern_t    and    use
40         mongoc_read_concern_append() to add the read concern to opts. See the
41         example code for mongoc_client_read_command_with_opts(). Read concern
42         requires MongoDB 3.2 or later, otherwise an error is returned.
43

DESCRIPTION

45       Creates a new mongoc_gridfs_bucket_t. Use this handle to perform GridFS
46       operations.
47

RETURNS

49       A newly allocated mongoc_gridfs_bucket_t  that  should  be  freed  with
50       mongoc_gridfs_bucket_destroy() or NULL on failure.
51

AUTHOR

53       MongoDB, Inc
54
56       2017-present, MongoDB, Inc
57
58
59
60
611.24.3                           Aug 17, 2023      MONGOC_GRIDFS_BUCKET_NEW(3)
Impressum