1MONGOC_GRIDFS_FIND_ONE_WITH_OPTSM(o3n)goDB C DriMvOeNrGOC_GRIDFS_FIND_ONE_WITH_OPTS(3)
2
3
4
6 mongoc_gridfs_find_one_with_opts - mongoc_gridfs_find_one_with_opts()
7
9 mongoc_gridfs_file_t *
10 mongoc_gridfs_find_one_with_opts (mongoc_gridfs_t *gridfs,
11 const bson_t *filter,
12 const bson_t *opts,
13 bson_error_t *error)
14 BSON_GNUC_WARN_UNUSED_RESULT;
15
17 · gridfs: A mongoc_gridfs_t.
18
19 · filter: A bson_t containing the query to execute.
20
21 · opts: A bson_t query options, including sort order and which fields
22 to return. Can be NULL.
23
24 · error: An optional location for a bson_error_t or NULL.
25
27 Find the first GridFS file matching filter. If there is an error, NULL
28 is returned and error is filled out; if there is no error but no match‐
29 ing file is found, NULL is returned and the error code and domain are
30 0.
31
32 See mongoc_collection_find_with_opts for a description of the filter
33 and opts parameters.
34
36 Errors are propagated via the error parameter.
37
39 Returns a newly allocated mongoc_gridfs_file_t if successful. You must
40 free the resulting file with mongoc_gridfs_file_destroy() when no
41 longer in use.
42
44 MongoDB, Inc
45
47 2017-present, MongoDB, Inc
48
49
50
51
521.14.0 Feb 22, 201M9ONGOC_GRIDFS_FIND_ONE_WITH_OPTS(3)