25 #ifndef AOSSL_MONGO_INCLUDE_MONGO_INTERFACE_H_ 26 #define AOSSL_MONGO_INCLUDE_MONGO_INTERFACE_H_ 36 const char * what_str;
40 int_msg =
"Error in Mongo Request: " + msg;
41 what_str = int_msg.c_str();
48 const char *
what()
const throw() {
58 virtual std::string get_value() = 0;
59 virtual std::string get_err_msg() = 0;
82 const char * collection_name) = 0;
89 std::string collection_name) = 0;
92 virtual void delete_document(
const char * key) = 0;
94 virtual void delete_document(std::string key) = 0;
96 virtual void delete_document(
const char * key, \
97 const char * collection_name) = 0;
99 virtual void delete_document(std::string key, \
100 std::string collection_name) = 0;
108 const char * collection_name) = 0;
111 std::string collection_name) = 0;
114 virtual void save_document(
const char * doc,
const char * key) = 0;
116 virtual void save_document(std::string doc, std::string key) = 0;
118 virtual void save_document(
const char * doc,
const char * key, \
119 const char * collection_name) = 0;
121 virtual void save_document(std::string doc, std::string key, \
122 std::string collection_name) = 0;
131 const char * opts_str) = 0;
137 std::string opts_str) = 0;
143 const char * opts_str,
const char * collection_name) = 0;
149 std::string opts_str, std::string collection_name) = 0;
162 #endif // AOSSL_MONGO_INCLUDE_MONGO_INTERFACE_H_ Interface used to store Mongo Responses.
Definition: mongo_interface.h:54
Returned from Queries in order to iterate over results.
Definition: mongo_interface.h:63
Mongo Exception, used to store errors passed from Mongo.
Definition: mongo_interface.h:33
virtual ~MongoInterface()
Destructor.
Definition: mongo_interface.h:76
const char * what() const
Show the error message in readable format.
Definition: mongo_interface.h:48
std::string int_msg
An error message passed on initialization.
Definition: mongo_interface.h:35
MongoException(std::string msg)
Create a Mongo Exception, and store the given error message.
Definition: mongo_interface.h:39
Definition: mongo_interface.h:73