Auxiliary class for connection to data base.
More...
#include <JDB.hh>
|
| static JDB & | get () |
| | Get connection to database. More...
|
| |
| static void | reset () |
| | Reset connection to database. More...
|
| |
| static void | reset (const std::string &usr, const std::string &pwd) |
| | Reset connection to database. More...
|
| |
| static void | reset (const std::string &cookie) |
| | Reset connection to database. More...
|
| |
Auxiliary class for connection to data base.
Definition at line 33 of file JDB.hh.
Default constructor.
Definition at line 111 of file JDB.hh.
| KM3NETDB::JDB::JDB |
( |
const JDB & |
| ) |
|
|
private |
| static JDB& KM3NETDB::JDB::get |
( |
| ) |
|
|
inlinestatic |
Get connection to database.
- Returns
- database connection
Definition at line 42 of file JDB.hh.
JDB()
Default constructor.
| static void KM3NETDB::JDB::reset |
( |
| ) |
|
|
inlinestatic |
Reset connection to database.
Definition at line 53 of file JDB.hh.
57 if (db.get() != NULL) {
static JDB & get()
Get connection to database.
JDB()
Default constructor.
static void reset()
Reset connection to database.
| static void KM3NETDB::JDB::reset |
( |
const std::string & |
usr, |
|
|
const std::string & |
pwd |
|
) |
| |
|
inlinestatic |
Reset connection to database.
- Parameters
-
| usr | user name |
| pwd | pass word |
Definition at line 70 of file JDB.hh.
72 static_cast<std::shared_ptr<Client>&
>(
JDB::get()) = Client::Create(Server::Default, usr.c_str(), pwd.c_str());
static JDB & get()
Get connection to database.
| static void KM3NETDB::JDB::reset |
( |
const std::string & |
cookie | ) |
|
|
inlinestatic |
Reset connection to database.
- Parameters
-
Definition at line 81 of file JDB.hh.
86 string buffer = cookie;
90 ifstream in(cookie.c_str());
96 if (pos != string::npos) {
103 static_cast<std::shared_ptr<Client>&
>(
JDB::get()) = Client::Create(Server::Default, buffer.c_str());
static JDB & get()
Get connection to database.
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
static JStat getFileStatus
Function object for file status.
static const char PREFIX_COOKIE
Cookie prefix.
| JDB& KM3NETDB::JDB::operator= |
( |
const JDB & |
| ) |
|
|
private |
The documentation for this class was generated from the following file: