ccgl::db_mongoc::MongoGridFs类 参考

A simple wrapper of the class of MongoDB database mongoc_gridfs_t. 更多...

#include <db_mongoc.h>

Public 成员函数

 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.


该类的文档由以下文件生成: