本文整理汇总了C++中Query::getColCount方法的典型用法代码示例。如果您正苦于以下问题:C++ Query::getColCount方法的具体用法?C++ Query::getColCount怎么用?C++ Query::getColCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Query
的用法示例。
在下文中一共展示了Query::getColCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processFlush
static void processFlush(Flush_t *fl, Lista<VQueries> *v_array, Journal **j_array, Hashtable **h_array, ofstream *results, ofstream* debug){
//cout << "Flush " << fl->validationId << endl;
uint32_t i=0, j=0;
VQueries* v;
v = v_array->preview();
if (v==NULL) return;
while(v->getVid() <= fl->validationId){ //gia validations
v = v_array->pop();
/*
if(v->getVid()==19631){
j_array[27]->printJournal();
cout << endl<<endl << "-------------------------------------------"<<endl<<endl;
j_array[26]->printJournal();
}
*/
bool answer = 0;
Lista<JournalRecord> * lista = NULL;
for (i=0; i< v->getQueryCount(); i++){ //gia queries
Query * q = v->getQuery(i);
Column * c;
/////////////////////////////
///*
for (j=0; j< q->getColCount(); j++){
c = q->getColumn(j);
if((c->getCol() == 0)&&(c->getOp() == Equal)){
lista = h_array[q->getRelId()]->getHashJR(j_array[q->getRelId()], v->getFrom(), v->getTo(), c->getVal());
break;
}
}
//*/
/////////////////////////////////
if(lista == NULL){
lista = j_array[q->getRelId()]->getJournalJR(v->getFrom(), v->getTo());
}
else if(lista->getCounter()==0){
delete lista;
lista = j_array[q->getRelId()]->getJournalJR(v->getFrom(), v->getTo());
}
answer = 1; //OR MAYBE answer = 1|1 of course;
for (j=0; j< q->getColCount(); j++){
c = q->getColumn(j);
uint64_t elemcount = lista->getCounter();
uint64_t elemptr;
uint32_t c1 = c->getCol();
uint64_t value = c->getVal();
Op_t op = c->getOp();
JournalRecord * rec;
for(elemptr=0; elemptr<elemcount; elemptr++){
rec = lista->pop();
if (rec==NULL) break;
switch(op){
case Equal:
if(rec->getSpecCol(c1+1)==value){
lista->push(rec);
}
break;
case NotEqual:
if(rec->getSpecCol(c1+1)!=value){
lista->push(rec);
}
break;
case Less:
if(rec->getSpecCol(c1+1)<value){
lista->push(rec);
}
break;
case LessOrEqual:
if(rec->getSpecCol(c1+1)<=value){
lista->push(rec);
}
break;
case Greater:
if(rec->getSpecCol(c1+1)>value){
lista->push(rec);
}
break;
case GreaterOrEqual:
if(rec->getSpecCol(c1+1)>=value){
lista->push(rec);
}
break;
//.........这里部分代码省略.........