Lines Matching defs:pItem
20008 struct SrcList_item *pItem = &pSrc->a[k];
20010 if( pItem->zDatabase ){
20011 sqlite3StrAccumAppend(pAccum, pItem->zDatabase, -1);
20014 sqlite3StrAccumAppend(pAccum, pItem->zName, -1);
73128 struct ExprList_item *pItem;
73130 for(i=p->nExpr, pItem=p->a; i>0; i--, pItem++){
73131 if( sqlite3WalkExpr(pWalker, pItem->pExpr) ) return WRC_Abort;
73164 struct SrcList_item *pItem;
73168 for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){
73169 if( sqlite3WalkSelect(pWalker, pItem->pSelect) ){
73360 struct SrcList_item *pItem; /* Use for looping over pSrcList items */
73381 for(i=0, pItem=pSrcList->a; i<pSrcList->nSrc; i++, pItem++){
73386 pTab = pItem->pTab;
73391 if( pItem->zAlias ){
73392 char *zTabName = pItem->zAlias;
73405 pExpr->iTable = pItem->iCursor;
73408 pMatch = pItem;
73417 if( pItem->jointype & JT_NATURAL ) continue;
73418 if( nameInUsingClause(pItem->pUsing, zCol) ) continue;
73421 pExpr->iTable = pItem->iCursor;
73423 pMatch = pItem;
73619 struct SrcList_item *pItem = &pSrc->a[iSrc];
73620 p->pTab = pItem->pTab;
73621 p->iTable = pItem->iCursor;
73628 pItem->colUsed |= ((Bitmask)1)<<(iCol>=BMS ? BMS-1 : iCol);
73675 struct SrcList_item *pItem;
73677 pItem = pSrcList->a;
73679 pExpr->pTab = pItem->pTab;
73680 pExpr->iTable = pItem->iCursor;
73970 struct ExprList_item *pItem;
73974 for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
73977 if( pItem->done ) continue;
73978 pE = pItem->pExpr;
73999 pItem->pExpr = pE = sqlite3Expr(db, TK_INTEGER, 0);
74004 pItem->iOrderByCol = (u16)iCol;
74005 pItem->done = 1;
74041 struct ExprList_item *pItem;
74052 for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
74053 if( pItem->iOrderByCol ){
74054 if( pItem->iOrderByCol>pEList->nExpr ){
74058 resolveAlias(pParse, pEList, pItem->iOrderByCol-1, pItem->pExpr, zType);
74090 struct ExprList_item *pItem; /* A term of the ORDER BY clause */
74097 for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
74098 Expr *pE = pItem->pExpr;
74105 pItem->iOrderByCol = (u16)iCol;
74116 pItem->iOrderByCol = (u16)iCol;
74121 pItem->iOrderByCol = 0;
74204 struct SrcList_item *pItem = &p->pSrc->a[i];
74205 if( pItem->pSelect ){
74212 ** pItem->pSelect, check if this value has changed. If so, then
74213 ** SELECT statement pItem->pSelect must be correlated. Set the
74214 ** pItem->isCorrelated flag if this is the case. */
74217 if( pItem->zName ) pParse->zAuthContext = pItem->zName;
74218 sqlite3ResolveSelectNames(pParse, pItem->pSelect, pOuterNC);
74223 assert( pItem->isCorrelated==0 && nRef<=0 );
74224 pItem->isCorrelated = (nRef!=0);
74283 struct ExprList_item *pItem;
74288 for(i=0, pItem=pGroupBy->a; i<pGroupBy->nExpr; i++, pItem++){
74289 if( ExprHasProperty(pItem->pExpr, EP_Agg) ){
75280 struct ExprList_item *pItem, *pOldItem;
75288 pNew->a = pItem = sqlite3DbMallocRaw(db, i*sizeof(p->a[0]) );
75289 if( pItem==0 ){
75294 for(i=0; i<p->nExpr; i++, pItem++, pOldItem++){
75296 pItem->pExpr = sqlite3ExprDup(db, pOldExpr, flags);
75297 pItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
75298 pItem->zSpan = sqlite3DbStrDup(db, pOldItem->zSpan);
75299 pItem->sortOrder = pOldItem->sortOrder;
75300 pItem->done = 0;
75301 pItem->iOrderByCol = pOldItem->iOrderByCol;
75302 pItem->iAlias = pOldItem->iAlias;
75439 struct ExprList_item *pItem = &pList->a[pList->nExpr++];
75440 memset(pItem, 0, sizeof(*pItem));
75441 pItem->pExpr = pExpr;
75468 struct ExprList_item *pItem;
75470 pItem = &pList->a[pList->nExpr-1];
75471 assert( pItem->zName==0 );
75472 pItem->zName = sqlite3DbStrNDup(pParse->db, pName->z, pName->n);
75473 if( dequote && pItem->zName ) sqlite3Dequote(pItem->zName);
75493 struct ExprList_item *pItem = &pList->a[pList->nExpr-1];
75495 assert( db->mallocFailed || pItem->pExpr==pSpan->pExpr );
75496 sqlite3DbFree(db, pItem->zSpan);
75497 pItem->zSpan = sqlite3DbStrNDup(db, (char*)pSpan->zStart,
75524 struct ExprList_item *pItem;
75527 for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
75528 sqlite3ExprDelete(db, pItem->pExpr);
75529 sqlite3DbFree(db, pItem->zName);
75530 sqlite3DbFree(db, pItem->zSpan);
76120 struct ExprList_item *pItem;
76132 for(i=pList->nExpr, pItem=pList->a; i>0; i--, pItem++){
76133 Expr *pE2 = pItem->pExpr;
77722 struct ExprList_item *pItem = pList->a;
77723 for(; i>0; i--, pItem++){
77724 if( ALWAYS(pItem->pExpr) ) pItem->pExpr->flags |= EP_FixedDest;
77782 struct ExprList_item *pItem;
77788 for(pItem=pList->a, i=0; i<n; i++, pItem++){
77789 Expr *pExpr = pItem->pExpr;
78249 struct SrcList_item *pItem = pSrcList->a;
78250 for(i=0; i<pSrcList->nSrc; i++, pItem++){
78253 if( pExpr->iTable==pItem->iCursor ){
78306 } /* endif pExpr->iTable==pItem->iCursor */
78318 struct AggInfo_func *pItem = pAggInfo->aFunc;
78319 for(i=0; i<pAggInfo->nFunc; i++, pItem++){
78320 if( sqlite3ExprCompare(pItem->pExpr, pExpr)==0 ){
78331 pItem = &pAggInfo->aFunc[i];
78332 pItem->pExpr = pExpr;
78333 pItem->iMem = ++pParse->nMem;
78335 pItem->pFunc = sqlite3FindFunction(pParse->db,
78339 pItem->iDistinct = pParse->nTab++;
78341 pItem->iDistinct = -1;
78393 struct ExprList_item *pItem;
78396 for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
78397 sqlite3ExprAnalyzeAggregates(pNC, pItem->pExpr);
80884 struct SrcList_item *pItem;
80888 for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
80889 if( pItem->zDatabase==0 ){
80890 pItem->zDatabase = sqlite3DbStrDup(pFix->pParse->db, zDb);
80891 }else if( sqlite3StrICmp(pItem->zDatabase,zDb)!=0 ){
80894 pFix->zType, pFix->pName, pItem->zDatabase);
80898 if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
80899 if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
80949 struct ExprList_item *pItem;
80951 for(i=0, pItem=pList->a; i<pList->nExpr; i++, pItem++){
80952 if( sqlite3FixExpr(pFix, pItem->pExpr) ){
84474 struct SrcList_item *pItem;
84486 pItem = &pList->a[pList->nSrc-1];
84495 pItem->zName = sqlite3NameFromToken(db, pTable);
84496 pItem->zDatabase = sqlite3NameFromToken(db, pDatabase);
84505 struct SrcList_item *pItem;
84508 for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
84509 if( pItem->iCursor>=0 ) break;
84510 pItem->iCursor = pParse->nTab++;
84511 if( pItem->pSelect ){
84512 sqlite3SrcListAssignCursors(pParse, pItem->pSelect->pSrc);
84523 struct SrcList_item *pItem;
84525 for(pItem=pList->a, i=0; i<pList->nSrc; i++, pItem++){
84526 sqlite3DbFree(db, pItem->zDatabase);
84527 sqlite3DbFree(db, pItem->zName);
84528 sqlite3DbFree(db, pItem->zAlias);
84529 sqlite3DbFree(db, pItem->zIndex);
84530 sqlite3DeleteTable(db, pItem->pTab);
84531 sqlite3SelectDelete(db, pItem->pSelect);
84532 sqlite3ExprDelete(db, pItem->pOn);
84533 sqlite3IdListDelete(db, pItem->pUsing);
84564 struct SrcList_item *pItem;
84576 pItem = &p->a[p->nSrc-1];
84579 pItem->zAlias = sqlite3NameFromToken(db, pAlias);
84581 pItem->pSelect = pSubquery;
84582 pItem->pOn = pOn;
84583 pItem->pUsing = pUsing;
84601 struct SrcList_item *pItem = &p->a[p->nSrc-1];
84602 assert( pItem->notIndexed==0 && pItem->zIndex==0 );
84606 pItem->notIndexed = 1;
84608 pItem->zIndex = sqlite3NameFromToken(pParse->db, pIndexedBy);
85539 struct SrcList_item *pItem = pSrc->a;
85541 assert( pItem && pSrc->nSrc==1 );
85542 pTab = sqlite3LocateTable(pParse, 0, pItem->zName, pItem->zDatabase);
85543 sqlite3DeleteTable(pParse->db, pItem->pTab);
85544 pItem->pTab = pTab;
85548 if( sqlite3IndexedByLookup(pParse, pItem) ){
88604 struct SrcList_item *pItem = pSrc->a;
88605 pItem->pTab = pFKey->pFrom;
88606 pItem->zName = pFKey->pFrom->zName;
88607 pItem->pTab->nRef++;
88608 pItem->iCursor = pParse->nTab++;
88622 pItem->zName = 0;
90610 struct SrcList_item *pItem; /* An element of pSelect->pSrc */
90680 pItem = pSelect->pSrc->a;
90681 pSrc = sqlite3LocateTable(pParse, 0, pItem->zName, pItem->zDatabase);
95299 struct ExprList_item *pItem;
95309 for(i=0, pItem=pList->a; i<nExpr; i++, pItem++){
95311 pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);
95316 pInfo->aSortOrder[i] = pItem->sortOrder;
96762 struct ExprList_item *pItem;
96763 for(j=0, pItem=pOrderBy->a; j<nOrderBy; j++, pItem++){
96764 assert( pItem->iOrderByCol>0 );
96765 if( pItem->iOrderByCol==i ) break;
96787 struct ExprList_item *pItem;
96788 for(i=0, pItem=pOrderBy->a; i<nOrderBy; i++, pItem++){
96789 assert( pItem->iOrderByCol>0 && pItem->iOrderByCol<=p->pEList->nExpr );
96790 aPermute[i] = pItem->iOrderByCol - 1;
97112 struct SrcList_item *pItem;
97124 for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){
97125 substSelect(db, pItem->pSelect, iTable, pEList);
98164 struct ExprList_item *pItem;
98167 for(j=0, pItem=pList->a; !pColl && j<nArg; j++, pItem++){
98168 pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);
98364 struct SrcList_item *pItem = &pTabList->a[i];
98366 Select *pSub = pItem->pSelect;
98370 if( pItem->addrFillSub ){
98371 sqlite3VdbeAddOp2(v, OP_Gosub, pItem->regReturn, pItem->addrFillSub);
98394 ** the content of this subquery. pItem->addrFillSub will point
98395 ** to the address of the generated subroutine. pItem->regReturn
98401 assert( pItem->addrFillSub==0 );
98402 pItem->regReturn = ++pParse->nMem;
98403 topAddr = sqlite3VdbeAddOp2(v, OP_Integer, 0, pItem->regReturn);
98404 pItem->addrFillSub = topAddr+1;
98405 VdbeNoopComment((v, "materialize %s", pItem->pTab->zName));
98406 if( pItem->isCorrelated==0 ){
98412 sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor);
98413 explainSetInteger(pItem->iSelectId, (u8)pParse->iNextSelectId);
98415 pItem->pTab->nRowEst = (unsigned)pSub->nSelectRow;
98417 retAddr = sqlite3VdbeAddOp1(v, OP_Return, pItem->regReturn);
98418 VdbeComment((v, "end %s", pItem->pTab->zName));
98635 struct ExprList_item *pItem; /* For looping over expression in a list */
98637 for(k=p->pEList->nExpr, pItem=p->pEList->a; k>0; k--, pItem++){
98638 pItem->iAlias = 0;
98640 for(k=pGroupBy->nExpr, pItem=pGroupBy->a; k>0; k--, pItem++){
98641 pItem->iAlias = 0;
99078 struct SrcList_item *pItem = &p->pSrc->a[i];
99079 sqlite3ExplainPrintf(pVdbe, "{%d,*} = ", pItem->iCursor);
99080 if( pItem->pSelect ){
99081 sqlite3ExplainSelect(pVdbe, pItem->pSelect);
99082 if( pItem->pTab ){
99083 sqlite3ExplainPrintf(pVdbe, " (tabname=%s)", pItem->pTab->zName);
99085 }else if( pItem->zName ){
99086 sqlite3ExplainPrintf(pVdbe, "%s", pItem->zName);
99088 if( pItem->zAlias ){
99089 sqlite3ExplainPrintf(pVdbe, " (AS %s)", pItem->zAlias);
99091 if( pItem->jointype & JT_LEFT ){
106296 struct SrcList_item *pItem = &pTabList->a[pLevel->iFrom];
106311 if( pItem->pSelect ){
106312 zMsg = sqlite3MAppendf(db, zMsg, "%s SUBQUERY %d", zMsg,pItem->iSelectId);
106314 zMsg = sqlite3MAppendf(db, zMsg, "%s TABLE %s", zMsg, pItem->zName);
106317 if( pItem->zAlias ){
106318 zMsg = sqlite3MAppendf(db, zMsg, "%s AS %s", zMsg, pItem->zAlias);
106321 char *zWhere = explainIndexRange(db, pLevel, pItem->pTab);