A simple wrapper of the class of MongoDB database mongoc_gridfs_t.
More...
#include <db_mongoc.h>
Public Member Functions | |
| MongoGridFs (mongoc_gridfs_t *gfs=NULL) | |
Constructor by a mongoc_gridfs_t pointer or NULL. | |
| ~MongoGridFs () | |
| Destructor. | |
| mongoc_gridfs_t * | GetGridFs () |
Get the current instance of mongoc_gridfs_t | |
| mongoc_gridfs_file_t * | GetFile (string const &gfilename, mongoc_gridfs_t *gfs=NULL, const STRING_MAP &opts=STRING_MAP()) |
| Get GridFS file by name. | |
| bool | RemoveFile (string const &gfilename, mongoc_gridfs_t *gfs=NULL, STRING_MAP opts=STRING_MAP()) |
| Remove GridFS all matching files and their data chunks. | |
| void | GetFileNames (vector< string > &files_existed, mongoc_gridfs_t *gfs=NULL) |
| Get GridFS file names. | |
| bson_t * | GetFileMetadata (string const &gfilename, mongoc_gridfs_t *gfs=NULL, STRING_MAP opts=STRING_MAP()) |
| Get metadata of a given GridFS file name, remember to destory bson_t after use. | |
| bool | GetStreamData (string const &gfilename, char *&databuf, vint &datalength, mongoc_gridfs_t *gfs=NULL, const STRING_MAP *opts=nullptr) |
| Get stream data of a given GridFS file name. | |
| bool | WriteStreamData (const string &gfilename, char *&buf, vint length, const bson_t *p, mongoc_gridfs_t *gfs=NULL) |
| Write stream data to a GridFS file. | |
A simple wrapper of the class of MongoDB database mongoc_gridfs_t.