Lines Matching refs:pIdxInfo

340   sqlite3_index_info *pIdxInfo  in qpvtabBestIndex()  argument
345 sqlite3_str_appendf(pStr, "nConstraint,%d,,,,\n", pIdxInfo->nConstraint); in qpvtabBestIndex()
346 for(i=0; i<pIdxInfo->nConstraint; i++){ in qpvtabBestIndex()
348 int iCol = pIdxInfo->aConstraint[i].iColumn; in qpvtabBestIndex()
349 int op = pIdxInfo->aConstraint[i].op; in qpvtabBestIndex()
350 if( iCol==QPVTAB_FLAGS && pIdxInfo->aConstraint[i].usable ){ in qpvtabBestIndex()
352 rc = sqlite3_vtab_rhs_value(pIdxInfo, i, &pVal); in qpvtabBestIndex()
355 pIdxInfo->idxNum = sqlite3_value_int(pVal); in qpvtabBestIndex()
356 if( pIdxInfo->idxNum & 0x002 ) pIdxInfo->orderByConsumed = 1; in qpvtabBestIndex()
368 pIdxInfo->aConstraint[i].usable); in qpvtabBestIndex()
370 rc = sqlite3_vtab_rhs_value(pIdxInfo, i, &pVal); in qpvtabBestIndex()
377 for(i=0; i<pIdxInfo->nConstraint; i++){ in qpvtabBestIndex()
378 int iCol = pIdxInfo->aConstraint[i].iColumn; in qpvtabBestIndex()
379 int op = pIdxInfo->aConstraint[i].op; in qpvtabBestIndex()
385 if( iCol>=QPVTAB_A && pIdxInfo->aConstraint[i].usable ){ in qpvtabBestIndex()
386 pIdxInfo->aConstraintUsage[i].argvIndex = ++k; in qpvtabBestIndex()
387 if( iCol<=QPVTAB_FLAGS || (pIdxInfo->idxNum & 0x004)!=0 ){ in qpvtabBestIndex()
388 pIdxInfo->aConstraintUsage[i].omit = 1; in qpvtabBestIndex()
392 sqlite3_str_appendf(pStr, "nOrderBy,%d,,,,\n", pIdxInfo->nOrderBy); in qpvtabBestIndex()
393 for(i=0; i<pIdxInfo->nOrderBy; i++){ in qpvtabBestIndex()
394 int iCol = pIdxInfo->aOrderBy[i].iColumn; in qpvtabBestIndex()
397 pIdxInfo->aOrderBy[i].desc in qpvtabBestIndex()
401 sqlite3_vtab_distinct(pIdxInfo)); in qpvtabBestIndex()
402 sqlite3_str_appendf(pStr, "idxFlags,%d,,,,\n", pIdxInfo->idxFlags); in qpvtabBestIndex()
403 sqlite3_str_appendf(pStr, "colUsed,%d,,,,\n", (int)pIdxInfo->colUsed); in qpvtabBestIndex()
404 pIdxInfo->estimatedCost = (double)10; in qpvtabBestIndex()
405 pIdxInfo->estimatedRows = 10; in qpvtabBestIndex()
406 sqlite3_str_appendf(pStr, "idxNum,%d,,,,\n", pIdxInfo->idxNum); in qpvtabBestIndex()
408 pIdxInfo->orderByConsumed); in qpvtabBestIndex()
409 pIdxInfo->idxStr = sqlite3_str_finish(pStr); in qpvtabBestIndex()
410 pIdxInfo->needToFreeIdxStr = 1; in qpvtabBestIndex()