Lines Matching refs:i
204 sqlite3_int64 i; /* Current entry */ member
278 pCur->i = -1; in vt02Open()
295 return pCur->i<0 || pCur->i>=pCur->iEof; in vt02Eof()
303 pCur->i += pCur->iIncr; in vt02Next()
304 if( pCur->i<0 ) pCur->i = pCur->iEof; in vt02Next()
305 }while( (pCur->mD & (1<<(pCur->i%10)))==0 && pCur->i<pCur->iEof ); in vt02Next()
352 pCur->i = 0; in vt02Filter()
355 pCur->i = sqlite3_value_int64(argv[0]); in vt02Filter()
356 if( pCur->i<0 ) pCur->i = -1; in vt02Filter()
357 if( pCur->i>9999 ) pCur->i = 10000; in vt02Filter()
358 pCur->iEof = pCur->i+1; in vt02Filter()
359 if( pCur->i<0 || pCur->i>9999 ) pCur->i = pCur->iEof; in vt02Filter()
361 int i, e, m; in vt02Filter() local
364 pCur->i = 0; in vt02Filter()
365 for(m=1000, i=0; i<=e; i++, m /= 10){ in vt02Filter()
369 pCur->i += m*v; in vt02Filter()
370 pCur->iEof = pCur->i+m; in vt02Filter()
373 int i, e, m, rc; in vt02Filter() local
377 pCur->i = 0; in vt02Filter()
378 for(m=1000, i=0; i<=e; i++, m /= 10){ in vt02Filter()
391 pCur->i += m*v; in vt02Filter()
392 pCur->iEof = pCur->i+m; in vt02Filter()
408 i = sqlite3_value_int(pVal); in vt02Filter()
409 if( i<0 || i>9 ) continue; in vt02Filter()
410 pCur->mD |= 1<<i; in vt02Filter()
438 int v = pCur->i; in vt02Column()
453 *pRowid = pCur->i+1; in vt02Rowid()
535 int i, rc; in sqlite3BestIndexLog() local
586 for(i=0; i<pInfo->nConstraint; i++){ in sqlite3BestIndexLog()
589 int iCol = pInfo->aConstraint[i].iColumn; in sqlite3BestIndexLog()
590 int op = pInfo->aConstraint[i].op; in sqlite3BestIndexLog()
606 i, in sqlite3BestIndexLog()
609 pInfo->aConstraint[i].usable); in sqlite3BestIndexLog()
611 rc = sqlite3_vtab_rhs_value(pInfo, i, &pVal); in sqlite3BestIndexLog()
619 sqlite3_vtab_collation(pInfo,i), in sqlite3BestIndexLog()
620 sqlite3_vtab_in(pInfo,i,-1)); in sqlite3BestIndexLog()
647 for(i=0; i<pInfo->nOrderBy; i++){ in sqlite3BestIndexLog()
648 int iCol = pInfo->aOrderBy[i].iColumn; in sqlite3BestIndexLog()
652 i, in sqlite3BestIndexLog()
654 pInfo->aOrderBy[i].desc in sqlite3BestIndexLog()
665 for(i=0; i<pInfo->nConstraint; i++){ in sqlite3BestIndexLog()
666 int iCol = pInfo->aConstraint[i].iColumn; in sqlite3BestIndexLog()
667 int op = pInfo->aConstraint[i].op; in sqlite3BestIndexLog()
682 i, in sqlite3BestIndexLog()
684 pInfo->aConstraintUsage[i].argvIndex, in sqlite3BestIndexLog()
685 pInfo->aConstraintUsage[i].omit in sqlite3BestIndexLog()
725 int i; /* Loop counter */ in vt02BestIndex() local
748 for(i=0; i<pInfo->nConstraint; i++){ in vt02BestIndex()
750 if( !pInfo->aConstraint[i].usable ) continue; in vt02BestIndex()
751 if( pInfo->aConstraint[i].op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue; in vt02BestIndex()
752 switch( pInfo->aConstraint[i].iColumn ){ in vt02BestIndex()
754 if( sqlite3_vtab_rhs_value(pInfo, i, &pVal)==SQLITE_OK in vt02BestIndex()
759 iFlagTerm = i; in vt02BestIndex()
762 if( sqlite3_vtab_rhs_value(pInfo, i, &pVal)==SQLITE_OK in vt02BestIndex()
767 iLogTerm = i; in vt02BestIndex()
775 for(i=0; i<pInfo->nConstraint; i++){ in vt02BestIndex()
776 int j = pInfo->aConstraint[i].iColumn; in vt02BestIndex()
778 if( pInfo->aConstraint[i].usable==0 in vt02BestIndex()
781 switch( pInfo->aConstraint[i].op ){ in vt02BestIndex()
784 isEq[j] = i; in vt02BestIndex()
790 isUsed[j] = i; in vt02BestIndex()
793 iOffset = i; in vt02BestIndex()
813 for(i=2; i<=4 && isEq[i]>=0; i++){ in vt02BestIndex()
814 if( i==4 && sqlite3_vtab_in(pInfo, isEq[4], 0) ) break; in vt02BestIndex()
815 pInfo->aConstraintUsage[isEq[i]].argvIndex = ++argvIndex; in vt02BestIndex()
816 if( flags & 0x20 ) pInfo->aConstraintUsage[isEq[i]].omit = 1; in vt02BestIndex()
819 pInfo->idxNum = i; in vt02BestIndex()
825 i++; in vt02BestIndex()
850 for(i=0; i<pInfo->nOrderBy; i++){ in vt02BestIndex()
851 int iCol = pInfo->aOrderBy[i].iColumn; in vt02BestIndex()
930 for(i=0; i<pInfo->nConstraint; i++){ in vt02BestIndex()
931 if( pInfo->aConstraint[i].usable in vt02BestIndex()
932 && pInfo->aConstraintUsage[i].argvIndex==0 in vt02BestIndex()
934 pInfo->aConstraintUsage[i].argvIndex = ++argvIndex; in vt02BestIndex()
935 if( flags & 0x20 ) pInfo->aConstraintUsage[i].omit = 1; in vt02BestIndex()