CGEM BOSS 6.6.5.i
BESIII Offline Software System
|
#include <Rdb.h>
Public Member Functions | |
virtual | ~Rdb () |
Rdb () | |
unsigned | getMajorVersion () |
unsigned | getMinorVersion () |
const std::string & | getCVSid () |
const std::string & | getDbName () |
Table * | getTable (const std::string &name) const |
Column * | getColumn (const std::string &tableName, const std::string &colName) const |
Index * | getIndex (const std::string &tableName, const std::string &indexName) const |
unsigned int | getNTable () const |
void | setConnection (Connection *connection) |
int | insertRow (const std::string &tName, Row &row, int *serial=0) const |
int | insertLatest (Table *t, Row &row, int *serial=0) const |
int | insertLatest (const std::string &tName, Row &row, int *serial=0) const |
int | supersedeRow (const std::string &tName, Row &row, int oldKey, int *newKey=0) const |
int | updateRows (const std::string &tName, Row &row, Assertion *where) const |
unsigned int | accept (Visitor *v) |
This is the recursive accept for the visitor pattern. | |
Friends | |
class | rdbModel::XercesBuilder |
This is the main container of all the rdb description. The Manager is responsible for its creation and destruction. Provide both a query interface (provide various functions to look up components by name) and also accept visitors.
Adapted from detModel::Gdd class, written by R. Giannitrapani and D. Favretto
|
virtual |
This is the destructor; it should be called only by the manager destructor. It starts the destruction of all the objects created by the builder
Definition at line 8 of file Rdb.cxx.
unsigned int rdbModel::Rdb::accept | ( | Visitor * | v | ) |
This is the recursive accept for the visitor pattern.
Definition at line 98 of file Rdb.cxx.
Referenced by rdbModel::MysqlConnection::matchSchema(), and rdbModel::Manager::startVisitor().
Column * rdbModel::Rdb::getColumn | ( | const std::string & | tableName, |
const std::string & | colName ) const |
|
inline |
|
inline |
Definition at line 56 of file Rdb.h.
Referenced by rdbModel::MysqlConnection::visitRdb().
Index * rdbModel::Rdb::getIndex | ( | const std::string & | tableName, |
const std::string & | indexName ) const |
|
inline |
|
inline |
|
inline |
Definition at line 68 of file Rdb.h.
Referenced by rdbModel::MysqlConnection::visitRdb().
Table * rdbModel::Rdb::getTable | ( | const std::string & | name | ) | const |
Definition at line 16 of file Rdb.cxx.
Referenced by calibUtil::Metadata::checkNulls(), calibUtil::Metadata::checkValues(), getColumn(), getIndex(), insertLatest(), insertRow(), main(), supersedeRow(), and updateRows().
int rdbModel::Rdb::insertLatest | ( | const std::string & | tName, |
Row & | row, | ||
int * | serial = 0 ) const |
The two forms of smart insert, in addition to filling in the service fields, as insertRow does, do various forms of consistency checking and may even update pre-existing rows.
Definition at line 72 of file Rdb.cxx.
Referenced by doSmartInsert().
int rdbModel::Rdb::insertRow | ( | const std::string & | tName, |
Row & | row, | ||
int * | serial = 0 ) const |
insertRow has only one value-added feature as compared to an SQL insert: it will take care of fields intended to be filled by the service (e.g., insert and update timestamps)
Definition at line 52 of file Rdb.cxx.
Referenced by doInsert().
void rdbModel::Rdb::setConnection | ( | Connection * | connection | ) |
Definition at line 43 of file Rdb.cxx.
Referenced by rdbModel::MysqlConnection::visitRdb().
int rdbModel::Rdb::supersedeRow | ( | const std::string & | tName, |
Row & | row, | ||
int | oldKey, | ||
int * | newKey = 0 ) const |
Fills in service fields, then invokes Connection::update
Definition at line 62 of file Rdb.cxx.
Referenced by doUpdate().
|
friend |