SYNOPSIS
mongoc_gridfs_file_list_t * mongoc_gridfs_find (mongoc_gridfs_t *gridfs, const bson_t *query); mongoc_gridfs_file_t * mongoc_gridfs_find_one (mongoc_gridfs_t *gridfs, const bson_t *query, bson_error_t *error); mongoc_gridfs_file_t * mongoc_gridfs_find_one_by_filename (mongoc_gridfs_t *gridfs, const char *filename, bson_error_t *error);
DESCRIPTION
The mongoc_gridfs_find() functions shall execute a query on the underlying gridfs implementation. The different variants offer:
-
full query match
-
query match that returns one file
-
automatic wrapping for a straight filename lookup
The bson query is not validated, simply passed along as appropriate to the server. As such, compatibility and errors should be validated in the appropriate server documentation.
RETURN VALUE
The mongoc_gridfs_find() function returns a mongoc_gridfs_file_list(7).
In the event of failure, NULL is returned.
ERRORS
errors are returned through error.
For mongoc_gridfs_find(), errors can be picked up through mongoc_gridfs_file_list_error(3).
AUTHORS
This page was written by MongoDB Inc.