mongoc_client_get_gridfs(3)

mongoc_client_get_gridfs3

Usage

mongoc_gridfs_t *
mongoc_client_get_gridfs (mongoc_client_t *client,
                          const char *db,
                          const char *prefix,
                          bson_error_t *error);

The mongoc_client_get_gridfs() function shall create a new mongoc_gridfs_t. The db parameter is the name of the database which the gridfs instance should exist in. The prefix parameter corresponds to the gridfs collection namespacing; its default is "fs", thus the default GridFS collection names are "fs.files" and "fs.chunks".

Parameters

•

client: A mongoc_client_t.

•

db: The database name.

•

prefix: Optional prefix for gridfs collection names or NULL.

•

error: An optional location for a bson_error_t or NULL.

Errors

Errors are propagated via the error parameter.

Returns

On success, returns a mongoc_gridfs_t you must free with mongoc_gridfs_destroy(). Returns NULL upon failure and sets error.

Releases

5 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13

Author

MongoDB, Inc

From libmongoc-doc 1.30.4-1+deb13u3 in Debian 13 (Trixie). Parsed by carta from the page's man source.