CGEM BOSS 6.6.5.g
BESIII Offline Software System
|
#include <Assertion.h>
Classes | |
class | Operator |
Public Member Functions | |
Assertion (Operator *op=0, Table *myTable=0, bool keepOp=false) | |
Assertion (const Assertion *orig, Row *toBe) | |
~Assertion () | |
Visitor::VisitorState | accept (Visitor *v) |
Operator * | getOperator () const |
const std::string & | getPrecompiled () const |
bool | getToBe () const |
bool | getOld () const |
const std::string & | getName () const |
void | setName (const std::string &name) |
bool | verify (Row &old, Row &toBe) const |
Assertions are used in at least two ways:
The bulk of the information comprising an assertion is kept in a tree whose nodes are "operations". An operation may be either a comparison ( =, <=, etc. and also "is null") or an operation which has child operations: OR, AND, NOT, for all, there exists, hence a node is a leaf node iff it's a comparison.
Once an operation has been incorporated into an Assertion or into another operation, it is 'owned' by this parent. Deleting the parent will cause its children to be deleted. Hence applications building assertions out of operators should never delete those operators.
Definition at line 56 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Assertion.h.
|
inline |
Normally, operator associated with the assertion will be deleted when the assertion itself is deleted, but this won't happen if keepOp is set to true.
Definition at line 180 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Assertion.h.
Copy original assertion, but, wherever a colRef is a "toBe", substitute with value from toBe row. toBe is not const because we may need to sort it.
Definition at line 23 of file Calibration/rdbModel/rdbModel-00-01-01/src/Tables/Assertion.cxx.
rdbModel::Assertion::~Assertion | ( | ) |
Definition at line 31 of file Calibration/rdbModel/rdbModel-00-01-01/src/Tables/Assertion.cxx.
Visitor::VisitorState rdbModel::Assertion::accept | ( | Visitor * | v | ) |
Definition at line 344 of file Calibration/rdbModel/rdbModel-00-01-01/src/Tables/Assertion.cxx.
|
inline |
Definition at line 207 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Assertion.h.
Referenced by rdbModel::Table::getAssertionByName().
|
inline |
Returns true if associated operator or descendant refers to existing row
Definition at line 205 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Assertion.h.
Referenced by verify().
|
inline |
Definition at line 195 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Assertion.h.
Referenced by rdbModel::MysqlConnection::compileAssertion().
|
inline |
Definition at line 197 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Assertion.h.
|
inline |
True if associated operator or descendant refers to future row (in which case can't call MySql::compileAssertion)
Definition at line 201 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Assertion.h.
Referenced by verify().
|
inline |
Definition at line 208 of file Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Assertion.h.
verify checks if assertion (which may refer to one or both of an old row and a proposed row) holds for these arguments.
Caller is responsible for fetching old row fields out of dbs if necessary May throw RdbException
Definition at line 350 of file Calibration/rdbModel/rdbModel-00-01-01/src/Tables/Assertion.cxx.
Referenced by rdbModel::Table::insertLatest(), rdbModel::Table::insertRow(), main(), and rdbModel::Assertion::Operator::verify().