BOSS 7.0.2
BESIII Offline Software System
|
#include <Connection.h>
Public Member Functions | |
Connection () | |
virtual | ~Connection () |
virtual bool | open (const std::string &host, const std::string &userid, const std::string &password, const std::string &dbName)=0 |
virtual bool | close ()=0 |
virtual bool | open (const std::string &parms)=0 |
virtual bool | isConnected ()=0 |
Return true iff open has been done with no matching close. | |
virtual std::ostream * | getOut () const =0 |
virtual std::ostream * | getErrOut () const =0 |
virtual MATCH | matchSchema (Rdb *rdb, bool matchDbName=true)=0 |
virtual bool | insertRow (const std::string &tableName, const StringVector &colNames, const StringVector &values, int *auto_value=0, const StringVector *nullCols=0)=0 |
virtual unsigned int | update (const std::string &tableName, const StringVector &colNames, const StringVector &values, const Assertion *where=0, const StringVector *nullCols=0)=0 |
virtual ResultHandle * | select (const std::string &tableName, const StringVector &getCols, const StringVector &orderCols, const Assertion *where=0, int rowLimit=0, int rowOffset=0)=0 |
virtual void | disableModify (bool disable)=0 |
virtual ResultHandle * | dbRequest (const std::string &request)=0 |
virtual bool | compileAssertion (const Assertion *a, std::string &sqlString) const =0 |
Connection () | |
virtual | ~Connection () |
virtual bool | open (const std::string &host, const std::string &userid, const std::string &password, const std::string &dbName)=0 |
virtual bool | close ()=0 |
virtual bool | open (const std::string &parms)=0 |
virtual bool | isConnected ()=0 |
Return true iff open has been done with no matching close. | |
virtual std::ostream * | getOut () const =0 |
virtual std::ostream * | getErrOut () const =0 |
virtual MATCH | matchSchema (Rdb *rdb, bool matchDbName=true)=0 |
virtual bool | insertRow (const std::string &tableName, const StringVector &colNames, const StringVector &values, int *auto_value=0, const StringVector *nullCols=0)=0 |
virtual unsigned int | update (const std::string &tableName, const StringVector &colNames, const StringVector &values, const Assertion *where=0, const StringVector *nullCols=0)=0 |
virtual ResultHandle * | select (const std::string &tableName, const StringVector &getCols, const StringVector &orderCols, const Assertion *where=0, int rowLimit=0, int rowOffset=0)=0 |
virtual void | disableModify (bool disable)=0 |
virtual ResultHandle * | dbRequest (const std::string &request)=0 |
virtual bool | compileAssertion (const Assertion *a, std::string &sqlString) const =0 |
Definition at line 54 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Db/Connection.h.
|
inline |
Open a connection Allowed operations will depend on userid, etc., specified return true if successful
Definition at line 60 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Db/Connection.h.
|
inlinevirtual |
Definition at line 61 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Db/Connection.h.
|
inline |
Open a connection Allowed operations will depend on userid, etc., specified return true if successful
Definition at line 60 of file InstallArea/include/rdbModel/rdbModel/Db/Connection.h.
|
inlinevirtual |
Definition at line 61 of file InstallArea/include/rdbModel/rdbModel/Db/Connection.h.
|
pure virtual |
Close the current open connection , if any. Return true if there was a connection to close and it was closed successfully
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
Referenced by calibUtil::Metadata::disconnectRead(), ConnectionDBBase::disconnectRead(), calibUtil::Metadata::disconnectWrite(), and ConnectionDBBase::disconnectWrite().
|
pure virtual |
Close the current open connection , if any. Return true if there was a connection to close and it was closed successfully
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
compile method for assertions. Use it internally, but also make it publicly available so assertions belonging to a table can save the compiled version.
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
compile method for assertions. Use it internally, but also make it publicly available so assertions belonging to a table can save the compiled version.
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Transmit raw request of any form to database. If it is a request that returns results, those results will be stored in a newly- allocated ResultHandle and dbRequest will return a pointer to it. Otherwise dbRequest will return a null pointer. Throw an exception if request fails for any reason.
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Transmit raw request of any form to database. If it is a request that returns results, those results will be stored in a newly- allocated ResultHandle and dbRequest will return a pointer to it. Otherwise dbRequest will return a null pointer. Throw an exception if request fails for any reason.
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Turn select and update into no-ops: output SQL string for debugging but don't change db
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Turn select and update into no-ops: output SQL string for debugging but don't change db
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
Referenced by rdbModel::Table::setConnection().
|
pure virtual |
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
Referenced by rdbModel::Table::setConnection().
|
pure virtual |
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Typical derived class will form a syntactically correct INSERT statement from the input arguments and issue it to the dbms. Return true if row was inserted successfully
Might also want to add a routine for INSERT ... SELECT
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
Referenced by rdbModel::Table::insertLatest(), rdbModel::Table::insertRow(), and calibUtil::Metadata::registerCalib().
|
pure virtual |
Typical derived class will form a syntactically correct INSERT statement from the input arguments and issue it to the dbms. Return true if row was inserted successfully
Might also want to add a routine for INSERT ... SELECT
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Return true iff open has been done with no matching close.
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Return true iff open has been done with no matching close.
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
Check to what degree local schema definition is compatible with remote db accessed via this connection. By default check db names match, but this may be disabled.
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
Check to what degree local schema definition is compatible with remote db accessed via this connection. By default check db names match, but this may be disabled.
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Parameter is normally path for an xml file descrbing the connection parameters
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Parameter is normally path for an xml file descrbing the connection parameters
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Support only for relatively simple SELECT, involving just one table.
tableName | |
getCols | vector of columns to be retrieved |
where | ptr to an Assertion object |
rowLimit | max number of rows to return |
rowOffset | offset for first row returned among those satisfying conditions; ignored if 0. |
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
Referenced by Coverage::checkType(), calibUtil::Metadata::getReadInfo(), rdbModel::Table::insertLatest(), and rdbModel::Table::supersedeRow().
|
pure virtual |
Support only for relatively simple SELECT, involving just one table.
tableName | |
getCols | vector of columns to be retrieved |
where | ptr to an Assertion object |
rowLimit | max number of rows to return |
rowOffset | offset for first row returned among those satisfying conditions; ignored if 0. |
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
|
pure virtual |
Generic UPDATE. Return value is number of rows changed.
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.
Referenced by rdbModel::Table::updateRows().
|
pure virtual |
Generic UPDATE. Return value is number of rows changed.
Implemented in rdbModel::MysqlConnection, and rdbModel::MysqlConnection.