version 1.1.2.1, 2004/11/17 19:25:03
|
version 1.1.2.2, 2004/11/17 20:23:27
|
|
|
compile(cqs); | compile(cqs); |
} | } |
| |
|
Cql2Dnf::Cql2Dnf(CQLPredicate& topLevel){ |
|
eval_heap.reserveCapacity(16); |
|
terminal_heap.reserveCapacity(16); |
|
compile(topLevel); |
|
} |
|
|
Cql2Dnf::~Cql2Dnf() {} | Cql2Dnf::~Cql2Dnf() {} |
| |
void Cql2Dnf::compile(CQLSelectStatement * cqs) |
void Cql2Dnf::compile(CQLSelectStatement * cqs){ |
|
CQLPredicate topLevel = cqs->getPredicate(); |
|
compile(topLevel); |
|
} |
|
|
|
void Cql2Dnf::compile(CQLPredicate& topLevel) |
{ | { |
if (!cqs->hasWhereClause()) return; |
//if (!cqs->hasWhereClause()) return; |
| |
_strip_ops_operands(cqs); |
_strip_ops_operands(topLevel); |
_buildEvalHeap(); | _buildEvalHeap(); |
_pushNOTDown(); | _pushNOTDown(); |
_factoring(); | _factoring(); |
|
|
} | } |
} | } |
*/ | */ |
void Cql2Dnf::_strip_ops_operands(CQLSelectStatement *cqs) |
void Cql2Dnf::_strip_ops_operands(CQLPredicate& topLevel) |
{ | { |
// | // |
// depth first search for all operations and operands | // depth first search for all operations and operands |
// extract operations and operands and store in respective arrays for later processing | // extract operations and operands and store in respective arrays for later processing |
// | // |
CQLPredicate topLevel = cqs->getPredicate(); |
|
_destruct(topLevel); | _destruct(topLevel); |
} | } |
| |