Lines Matching refs:iCol
3827 SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
3828 SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
3829 SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
3830 SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
3831 SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
3832 SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
3833 SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
3834 SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
3835 SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
3836 SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
9881 u16 iCol; /* For ORDER BY, column number in result set */
59125 ** Check to see if column iCol of the given statement is valid. If
59127 ** If iCol is not valid, return a pointer to a Mem which has a value
66521 int iCol; /* Table column this handle is open on */
66559 u32 type = v->apCsr[0]->aType[p->iCol];
66568 p->iOffset = v->apCsr[0]->aOffset[p->iCol];
66610 int iCol; /* Index of zColumn in row-record */
66691 for(iCol=0; iCol<pTab->nCol; iCol++) {
66692 if( sqlite3StrICmp(pTab->aCol[iCol].zName, zColumn)==0 ){
66696 if( iCol==pTab->nCol ){
66721 if( pFKey->aCol[j].iFrom==iCol ){
66731 if( pIdx->aiColumn[j]==iCol ){
66796 pBlob->iCol = iCol;
67616 ** Turn the pExpr expression into an alias for the iCol-th column of the
67645 int iCol, /* A column in the result set. 0..pEList->nExpr-1 */
67649 Expr *pOrig; /* The iCol-th column of the result set */
67653 assert( iCol>=0 && iCol<pEList->nExpr );
67654 pOrig = pEList->a[iCol].pExpr;
67662 if( pEList->a[iCol].iAlias==0 ){
67663 pEList->a[iCol].iAlias = (u16)(++pParse->nAlias);
67665 pDup->iTable = pEList->a[iCol].iAlias;
67837 int iCol;
67840 for(iCol=0; iCol<pTab->nCol; iCol++){
67841 Column *pCol = &pTab->aCol[iCol];
67843 if( iCol==pTab->iPKey ){
67844 iCol = -1;
67849 if( iCol>=pTab->nCol && sqlite3IsRowid(zCol) ){
67850 iCol = -1; /* IMP: R-44911-55124 */
67852 if( iCol<pTab->nCol ){
67854 if( iCol<0 ){
67857 testcase( iCol==31 );
67858 testcase( iCol==32 );
67859 pParse->oldmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));
67861 testcase( iCol==31 );
67862 testcase( iCol==32 );
67863 pParse->newmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));
67865 pExpr->iColumn = (i16)iCol;
68000 ** Allocate and return a pointer to an expression to load the column iCol
68003 SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *db, SrcList *pSrc, int iSrc, int iCol){
68009 if( p->pTab->iPKey==iCol ){
68012 p->iColumn = (ynVar)iCol;
68013 testcase( iCol==BMS );
68014 testcase( iCol==BMS-1 );
68015 pItem->colUsed |= ((Bitmask)1)<<(iCol>=BMS ? BMS-1 : iCol);
68362 int iCol = -1;
68366 if( sqlite3ExprIsInteger(pE, &iCol) ){
68367 if( iCol<=0 || iCol>pEList->nExpr ){
68372 iCol = resolveAsName(pParse, pEList, pE);
68373 if( iCol==0 ){
68377 iCol = resolveOrderByTermToExprList(pParse, pSelect, pDup);
68382 if( iCol>0 ){
68390 pE->u.iValue = iCol;
68391 pItem->iCol = (u16)iCol;
68412 ** result set expression (as determined by the ExprList.a.iCol field)
68440 if( pItem->iCol ){
68441 if( pItem->iCol>pEList->nExpr ){
68445 resolveAlias(pParse, pEList, pItem->iCol-1, pItem->pExpr, zType);
68476 int iCol; /* Column number */
68486 iCol = resolveAsName(pParse, pSelect->pEList, pE);
68487 if( iCol>0 ){
68489 ** a copy of the iCol-th result-set column. The subsequent call to
68491 ** copy of the iCol-th result-set expression. */
68492 pItem->iCol = (u16)iCol;
68495 if( sqlite3ExprIsInteger(pE, &iCol) ){
68499 if( iCol<1 ){
68503 pItem->iCol = (u16)iCol;
68508 pItem->iCol = 0;
69669 pItem->iCol = pOldItem->iCol;
70247 int iCol = pExpr->iColumn; /* Index of column <column> */
70262 if( iCol<0 ){
70286 int affinity_ok = (pTab->aCol[iCol].affinity==aff||aff==SQLITE_AFF_NONE);
70289 if( (pIdx->aiColumn[0]==iCol)
70307 if( prNotFound && !pTab->aCol[iCol].notNull ){
70796 SQLITE_PRIVATE void sqlite3ExprCacheStore(Parse *pParse, int iTab, int iCol, int iReg){
70803 assert( iCol>=-1 && iCol<32768 ); /* Finite column numbers */
70819 if( p->iReg && p->iTable==iTab && p->iColumn==iCol ){
70827 assert( p->iReg==0 || p->iTable!=iTab || p->iColumn!=iCol );
70836 p->iColumn = iCol;
70857 p->iColumn = iCol;
70927 ** Generate code to extract the value of the iCol-th column of a table.
70933 int iCol, /* Index of the column to extract */
70936 if( iCol<0 || iCol==pTab->iPKey ){
70940 sqlite3VdbeAddOp3(v, op, iTabCur, iCol, regOut);
70942 if( iCol>=0 ){
70943 sqlite3ColumnDefault(v, pTab, iCol, regOut);
74744 int iCol; /* Index of column in table */
74766 iCol = pExpr->iColumn;
74769 if( iCol>=0 ){
74770 assert( iCol<pTab->nCol );
74771 zCol = pTab->aCol[iCol].zName;
75963 int iCol = -1, i;
75972 iCol = pTab->nCol - 1;
75973 pTab->aCol[iCol].isPrimKey = 1;
75976 for(iCol=0; iCol<pTab->nCol; iCol++){
75977 if( sqlite3StrICmp(pList->a[i].zName, pTab->aCol[iCol].zName)==0 ){
75981 if( iCol<pTab->nCol ){
75982 pTab->aCol[iCol].isPrimKey = 1;
75985 if( pList->nExpr>1 ) iCol = -1;
75987 if( iCol>=0 && iCol<pTab->nCol ){
75988 zType = pTab->aCol[iCol].zType;
75992 pTab->iPKey = iCol;
76995 int iCol = p->nCol-1;
76996 if( NEVER(iCol<0) ) goto fk_end;
77000 p->aCol[iCol].zName, pTo);
79493 int iCol; /* Iterator used while populating OLD.* */
79507 for(iCol=0; iCol<pTab->nCol; iCol++){
79508 if( mask==0xffffffff || mask&(1<<iCol) ){
79509 sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, iCol, iOld+iCol+1);
81478 int iCol = pIdx->aiColumn[i]; /* Index of column in parent tbl */
81485 zDfltColl = pParent->aCol[iCol].zColl;
81491 zIdxCol = pParent->aCol[iCol].zName;
81722 int iCol; /* Index of column in child table */
81731 iCol = pIdx->aiColumn[i];
81732 pCol = &pTab->aCol[iCol];
81733 if( pTab->iPKey==iCol ) iCol = -1;
81734 pLeft->iTable = regData+iCol+1;
81742 iCol = aiCol ? aiCol[i] : pFKey->aCol[0].iFrom;
81743 assert( iCol>=0 );
81744 zCol = pFKey->pFrom->aCol[iCol].zName;
81942 int iCol;
81964 iCol = pFKey->aCol[0].iFrom;
81965 aiCol = &iCol;
84474 const void * (*column_blob)(sqlite3_stmt*,int iCol);
84475 int (*column_bytes)(sqlite3_stmt*,int iCol);
84476 int (*column_bytes16)(sqlite3_stmt*,int iCol);
84482 double (*column_double)(sqlite3_stmt*,int iCol);
84483 int (*column_int)(sqlite3_stmt*,int iCol);
84484 sqlite_int64 (*column_int64)(sqlite3_stmt*,int iCol);
84491 const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
84492 const void * (*column_text16)(sqlite3_stmt*,int iCol);
84493 int (*column_type)(sqlite3_stmt*,int iCol);
84494 sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
88049 int iCol; /* Index of column matching zCol */
88053 iCol = columnIndex(pSrc->a[i].pTab, zCol);
88054 if( iCol>=0 ){
88057 *piCol = iCol;
88835 int iCol = pExpr->iColumn; /* Index of column in pTab */
88876 if( iCol>=0 && ALWAYS(iCol<pS->pEList->nExpr) ){
88877 /* If iCol is less than zero, then the expression requests the
88882 Expr *p = pS->pEList->a[iCol].pExpr;
88891 if( iCol<0 ) iCol = pTab->iPKey;
88892 assert( iCol==-1 || (iCol>=0 && iCol<pTab->nCol) );
88893 if( iCol<0 ){
88897 zType = pTab->aCol[iCol].zType;
88898 zOriginCol = pTab->aCol[iCol].zName;
89012 int iCol = p->iColumn;
89018 if( iCol<0 ) iCol = pTab->iPKey;
89019 assert( iCol==-1 || (iCol>=0 && iCol<pTab->nCol) );
89020 if( iCol<0 ){
89023 zCol = pTab->aCol[iCol].zName;
89089 int iCol = pColExpr->iColumn;
89091 if( iCol<0 ) iCol = pTab->iPKey;
89093 iCol>=0 ? pTab->aCol[iCol].zName : "rowid");
89305 ** Return the appropriate collating sequence for the iCol-th column of
89312 static CollSeq *multiSelectCollSeq(Parse *pParse, Select *p, int iCol){
89315 pRet = multiSelectCollSeq(pParse, p->pPrior, iCol);
89319 assert( iCol>=0 );
89320 if( pRet==0 && iCol<p->pEList->nExpr ){
89321 pRet = sqlite3ExprCollSeq(pParse, p->pEList->a[iCol].pExpr);
90030 assert( pItem->iCol>0 );
90031 if( pItem->iCol==i ) break;
90039 pOrderBy->a[nOrderBy++].iCol = (u16)i;
90055 assert( pItem->iCol>0 && pItem->iCol<=p->pEList->nExpr );
90056 aPermute[i] = pItem->iCol - 1;
90627 if( p->pOrderBy->a[ii].iCol==0 ) return 0;
95059 int iCol;
95068 for(iCol=0; iCol<pTab->nCol; iCol++){
95069 char *zType = pTab->aCol[iCol].zType;
95094 pTab->aCol[iCol].isHidden = 1;
96190 int iCol = pRight->iColumn;
96191 pVal = sqlite3VdbeGetValue(pReprepare, iCol, SQLITE_AFF_NONE);
96195 sqlite3VdbeSetVarmask(pParse->pVdbe, iCol); /* IMP: R-23257-02778 */
97306 int iCol = pTerm->u.leftColumn;
97307 Bitmask cMask = iCol>=BMS ? ((Bitmask)1)<<(BMS-1) : ((Bitmask)1)<<iCol;
97308 testcase( iCol==BMS );
97309 testcase( iCol==BMS-1 );
97357 int iCol = pTerm->u.leftColumn;
97358 Bitmask cMask = iCol>=BMS ? ((Bitmask)1)<<(BMS-1) : ((Bitmask)1)<<iCol;
107023 int iCol;
107048 iCol = pTab->iPKey;
107049 if( iCol>=0 ){
107050 pCol = &pTab->aCol[iCol];
107053 for(iCol=0; iCol<pTab->nCol; iCol++){
107054 pCol = &pTab->aCol[iCol];
107059 if( iCol==pTab->nCol ){
107080 autoinc = pTab->iPKey==iCol && (pTab->tabFlags & TF_Autoincrement)!=0;
108208 int fts3_global_term_cnt(int iTerm, int iCol);
108209 int fts3_term_cnt(int iTerm, int iCol);
108626 int iCol;
109053 int iCol; /* Column index */
109176 for(iCol=0; iCol<nCol; iCol++){
109179 z = (char *)sqlite3Fts3NextToken(aCol[iCol], &n);
109183 p->azColumn[iCol] = zCsr;
109681 ** If parameter iCol is not 0, write an POS_COLUMN (1) byte followed by
109682 ** the value of iCol encoded as a varint to *pp. This will start a new
109686 ** returning (do not modify it if iCol==0). Return the total number of bytes
109687 ** written (0 if iCol==0).
109689 static int fts3PutColNumber(char **pp, int iCol){
109691 if( iCol ){
109693 n = 1 + sqlite3Fts3PutVarint(&p[1], iCol);
110456 filter.iCol = iColumn;
110526 int iCol = pExpr->pPhrase->iColumn;
110531 rc = sqlite3Fts3DeferToken(pCsr, pToken, iCol);
110586 int iCol = pPhrase->iColumn;
110661 rc = fts3TermSelect(p, pTok, iCol, isTermPos, &nList, &pList);
111258 int iCol = idxNum-FTS3_FULLTEXT_SEARCH;
111266 iCol, zQuery, -1, &pCsr->pExpr
111343 int iCol /* Index of column to read value from */
111350 assert( iCol>=0 && iCol<=p->nColumn+1 );
111352 if( iCol==p->nColumn+1 ){
111359 }else if( iCol==p->nColumn ){
111368 sqlite3_result_value(pContext, sqlite3_column_value(pCsr->pStmt, iCol+1));
111464 int iCol /* Column of requested pos-list */
111482 if( iCol<0 ){
111483 /* If iCol is negative, return a pointer to the start of the
111489 while( iThis<iCol ){
111495 if( iCol==iThis && (*pCsr&0xFE) ) return pCsr;
111547 int iCol = -1;
111564 case 5: iCol = sqlite3_value_int(apVal[4]);
111572 sqlite3Fts3Snippet(pContext, pCsr, zStart, zEnd, zEllipsis, iCol, nToken);
112009 int iCol, /* Value for Fts3Phrase.iColumn */
112039 pRet->pPhrase->iColumn = iCol;
112210 int iCol;
112325 iCol = pParse->iDefaultCol;
112333 iCol = ii;
112338 rc = getNextToken(pParse, iCol, &z[iColLen], n-iColLen, ppExpr, pnConsumed);
114618 int iCol; /* Column token must occur in */
115023 sqlite3_int64 iCol, /* Column for entry to add */
115046 if( iCol>0 && p->iLastCol!=iCol ){
115048 || SQLITE_OK!=(rc = fts3PendingListAppendVarint(&p, iCol))
115052 p->iLastCol = iCol;
115055 if( iCol>=0 ){
115075 ** p->iPrevDocid, and the column is specified by argument iCol.
115082 int iCol, /* Column into which text is being inserted */
115128 if( fts3PendingListAppend(&pList, p->iPrevDocid, iCol, iPos, &rc) ){
116592 ** identify the subset of the position list that corresponds to column iCol.
116594 ** If there are no entries in the input position list for column iCol, then
116598 int iCol, /* Column to filter on */
116608 assert( iCol>=0 );
116613 if( iCol==iCurrent ){
116791 fts3ColumnFilter(pFilter->iCol, &pList, &nList);
117296 if( (pDef->iCol>=p->nColumn || pDef->iCol==i)
117324 int iCol /* Column that token must appear in (or -1) */
117334 pDeferred->iCol = iCol;
117504 int iCol; /* Extract snippet from this column */
117521 int iCol; /* Column snippet is extracted from */
117883 pCsr = sqlite3Fts3FindPositions(pExpr, p->pCsr->iPrevId, p->iCol);
117901 ** from column iCol that represent the "best" snippet. The best snippet
117917 int iCol, /* Index of column to create snippet from */
117954 sIter.iCol = iCol;
117970 pFragment->iCol = iCol;
118133 int iCol = pFragment->iCol+1; /* Query column to extract text from */
118139 zDoc = (const char *)sqlite3_column_text(pCsr->pStmt, iCol);
118141 if( sqlite3_column_type(pCsr->pStmt, iCol)!=SQLITE_NULL ){
118146 nDoc = sqlite3_column_bytes(pCsr->pStmt, iCol);
118244 sqlite3_int64 iCol = 0;
118247 pCsr += sqlite3Fts3GetVarint(pCsr, &iCol);
118252 aOut[iCol*3+1]++;
118254 aOut[iCol*3] += nHit;
118272 ** for(iCol=0; iCol<nCol; iCol++){
118273 ** aMatchinfo[3*iPhrase*nCol + 3*iCol + 1] = X;
118274 ** aMatchinfo[3*iPhrase*nCol + 3*iCol + 2] = Y;
118277 ** where X is the number of matches for phrase iPhrase is column iCol of all
118278 ** rows of the table. Y is the number of rows for which column iCol contains
118315 int iCol; /* Column index */
118316 for(iCol=0; iCol<p->nCol; iCol++){
118317 aOut[iCol*3 + 1] = (u32)p->nDoc;
118318 aOut[iCol*3 + 2] = (u32)p->nDoc;
118444 int iCol; /* Current column number */
118449 ** If LcsIterator.iCol is set to the following value, the iterator has
118476 pIter->iCol = LCS_ITERATOR_FINISHED;
118481 pIter->iCol = (int)iRead;
118507 int iCol;
118526 pIter->iCol = LCS_ITERATOR_FINISHED;
118530 for(iCol=0; iCol<pInfo->nCol; iCol++){
118535 ** iterators that point to a position-list corresponding to column iCol.
118538 assert( aIter[i].iCol>=iCol );
118539 if( aIter[i].iCol==iCol ) nLive++;
118543 ** iterating through positions in column iCol. Exactly one of the
118552 if( iCol!=pIter->iCol ){
118570 pInfo->aMatchinfo[iCol] = nLcs;
118631 int iCol;
118632 for(iCol=0; iCol<pInfo->nCol; iCol++){
118635 pInfo->aMatchinfo[iCol] = (u32)(((u32)(nToken&0xffffffff)+nDoc/2)/nDoc);
118645 int iCol;
118647 for(iCol=0; iCol<pInfo->nCol; iCol++){
118650 pInfo->aMatchinfo[iCol] = (u32)nToken;
118769 int iCol, /* Extract snippet from this column */
118814 ** If the iCol argument to this function was negative, this means all
118815 ** columns of the FTS3 table. Otherwise, only column iCol is considered.
118820 if( iCol>=0 && iRead!=iCol ) continue;
118872 int iCol; /* Column of table to populate aTerm for */
118889 pList = sqlite3Fts3FindPositions(pExpr, p->iDocid, p->iCol);
118919 int iCol; /* Column currently being processed */
118946 for(iCol=0; iCol<pTab->nColumn; iCol++){
118954 /* Initialize the contents of sCtx.aTerm[] for column iCol. There is
118958 sCtx.iCol = iCol;
118962 /* Retreive the text stored in column iCol. If an SQL NULL is stored
118963 ** in column iCol, jump immediately to the next iteration of the loop.
118968 zDoc = (const char *)sqlite3_column_text(pCsr->pStmt, iCol+1);
118969 nDoc = sqlite3_column_bytes(pCsr->pStmt, iCol+1);
118971 if( sqlite3_column_type(pCsr->pStmt, iCol+1)==SQLITE_NULL ){
118978 /* Initialize a tokenizer iterator to iterate through column iCol. */
119013 "%d %d %d %d ", iCol, pTerm-sCtx.aTerm, iStart, iEnd-iStart