#include <MongoInterface.h>
Definition at line 29 of file MongoInterface.h.
◆ connect() [1/6]
std::shared_ptr< Collection > MongoInterface::connect |
( |
const char * |
db_uri, |
|
|
const char * |
db_name, |
|
|
const char * |
collectionName |
|
) |
| |
Definition at line 47 of file MongoInterface.cpp.
48 auto dbConnection = getOrCreateConnection(db_uri);
49 return std::make_shared<Collection>(dbConnection, db_name, collectionName);
◆ connect() [2/6]
std::shared_ptr<Collection> knowrob::mongo::MongoInterface::connect |
( |
const char * |
db_uri, |
|
|
const char * |
db_name, |
|
|
const char * |
collectionName |
|
) |
| |
◆ connect() [3/6]
std::shared_ptr< Database > MongoInterface::connect |
( |
const PlTerm & |
dbTerm | ) |
|
Definition at line 37 of file MongoInterface.cpp.
38 auto dbConnection = getOrCreateConnection((
char *) dbTerm[1]);
39 return std::make_shared<Database>(dbConnection->pool_, (
char *) dbTerm[2]);
◆ connect() [4/6]
std::shared_ptr<Database> knowrob::mongo::MongoInterface::connect |
( |
const PlTerm & |
dbTerm | ) |
|
◆ connect() [5/6]
std::shared_ptr< Collection > MongoInterface::connect |
( |
const PlTerm & |
dbTerm, |
|
|
const char * |
collectionName |
|
) |
| |
Definition at line 42 of file MongoInterface.cpp.
43 return connect((
char *) dbTerm[1], (
char *) dbTerm[2], collectionName);
std::shared_ptr< Database > connect(const PlTerm &dbTerm)
◆ connect() [6/6]
std::shared_ptr<Collection> knowrob::mongo::MongoInterface::connect |
( |
const PlTerm & |
dbTerm, |
|
|
const char * |
collectionName |
|
) |
| |
◆ cursor() [1/2]
std::shared_ptr< Cursor > MongoInterface::cursor |
( |
const char * |
curser_id | ) |
|
Definition at line 66 of file MongoInterface.cpp.
67 std::lock_guard<std::mutex> scoped_lock(mongo_mutex_);
◆ cursor() [2/2]
std::shared_ptr<Cursor> knowrob::mongo::MongoInterface::cursor |
( |
const char * |
curser_id | ) |
|
◆ cursor_create() [1/2]
std::shared_ptr< Cursor > MongoInterface::cursor_create |
( |
const PlTerm & |
db_term, |
|
|
const char * |
coll_name |
|
) |
| |
Definition at line 53 of file MongoInterface.cpp.
54 auto coll =
connect(db_term, coll_name);
55 auto c = std::make_shared<Cursor>(coll);
56 std::lock_guard<std::mutex> scoped_lock(mongo_mutex_);
57 cursors_[c->id()] = c;
◆ cursor_create() [2/2]
std::shared_ptr<Cursor> knowrob::mongo::MongoInterface::cursor_create |
( |
const PlTerm & |
db_term, |
|
|
const char * |
coll_name |
|
) |
| |
◆ cursor_destroy() [1/2]
void MongoInterface::cursor_destroy |
( |
const char * |
curser_id | ) |
|
Definition at line 61 of file MongoInterface.cpp.
62 std::lock_guard<std::mutex> scoped_lock(mongo_mutex_);
63 cursors_.erase(curser_id);
◆ cursor_destroy() [2/2]
void knowrob::mongo::MongoInterface::cursor_destroy |
( |
const char * |
curser_id | ) |
|
◆ get() [1/2]
◆ get() [2/2]
The documentation for this class was generated from the following files: