Lines Matching refs:pNC

11122     NameContext *pNC;                          /* Naming context */
71933 NameContext *pNC, /* The name context used to resolve the name */
71942 NameContext *pTopNC = pNC; /* First namecontext in the list */
71946 assert( pNC ); /* the name context cannot be NULL. */
71956 while( pNC && cnt==0 ){
71958 SrcList *pSrcList = pNC->pSrcList;
72100 if( cnt==0 && (pEList = pNC->pEList)!=0 && zTab==0 ){
72109 if( !pNC->allowAgg && ExprHasProperty(pOrig, EP_Agg) ){
72126 pNC = pNC->pNext;
72137 ** Because no reference was made to outer contexts, the pNC->nRef
72189 assert( pNC!=0 );
72190 sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList);
72196 if( pTopNC==pNC ) break;
72240 NameContext *pNC;
72243 pNC = pWalker->u.pNC;
72244 assert( pNC!=0 );
72245 pParse = pNC->pParse;
72251 if( pNC->pSrcList && pNC->pSrcList->nAlloc>0 ){
72252 SrcList *pSrcList = pNC->pSrcList;
72254 for(i=0; i<pNC->pSrcList->nSrc; i++){
72267 SrcList *pSrcList = pNC->pSrcList;
72283 return lookupName(pParse, 0, 0, pExpr->u.zToken, pNC, pExpr);
72307 return lookupName(pParse, zDb, zTable, zColumn, pNC, pExpr);
72347 pNC->nErr++;
72354 if( is_agg && !pNC->allowAgg ){
72356 pNC->nErr++;
72360 pNC->nErr++;
72364 pNC->nErr++;
72368 pNC->hasAgg = 1;
72370 if( is_agg ) pNC->allowAgg = 0;
72372 if( is_agg ) pNC->allowAgg = 1;
72385 int nRef = pNC->nRef;
72387 if( pNC->isCheck ){
72392 assert( pNC->nRef>=nRef );
72393 if( nRef!=pNC->nRef ){
72401 if( pNC->isCheck ){
72659 ** The Name context of the SELECT statement is pNC. zType is either
72676 NameContext *pNC, /* The name context of the SELECT statement */
72689 pParse = pNC->pParse;
72715 if( sqlite3ResolveExprNames(pNC, pE) ){
72742 pOuterNC = pWalker->u.pNC;
72799 NameContext *pNC; /* Used to iterate name contexts */
72808 for(pNC=pOuterNC; pNC; pNC=pNC->pNext) nRef += pNC->nRef;
72815 for(pNC=pOuterNC; pNC; pNC=pNC->pNext) nRef -= pNC->nRef;
72946 ** If the function is an aggregate function, then the pNC->hasAgg is
72955 NameContext *pNC, /* Namespace to resolve expressions in. */
72964 Parse *pParse = pNC->pParse;
72965 if( sqlite3ExprCheckHeight(pParse, pExpr->nHeight+pNC->pParse->nHeight) ){
72971 savedHasAgg = pNC->hasAgg;
72972 pNC->hasAgg = 0;
72975 w.pParse = pNC->pParse;
72976 w.u.pNC = pNC;
72979 pNC->pParse->nHeight -= pExpr->nHeight;
72981 if( pNC->nErr>0 || w.pParse->nErr>0 ){
72984 if( pNC->hasAgg ){
72987 pNC->hasAgg = 1;
73016 w.u.pNC = pOuterNC;
76554 NameContext *pNC = pWalker->u.pNC;
76555 Parse *pParse = pNC->pParse;
76556 SrcList *pSrcList = pNC->pSrcList;
76557 AggInfo *pAggInfo = pNC->pAggInfo;
76630 /* The pNC->nDepth==0 test causes aggregate functions in subqueries
76632 if( pNC->nDepth==0 ){
76676 NameContext *pNC = pWalker->u.pNC;
76677 if( pNC->nDepth==0 ){
76678 pNC->nDepth++;
76680 pNC->nDepth--;
76695 SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext *pNC, Expr *pExpr){
76699 w.u.pNC = pNC;
76700 assert( pNC->pSrcList!=0 );
76710 SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext *pNC, ExprList *pList){
76715 sqlite3ExprAnalyzeAggregates(pNC, pItem->pExpr);
93347 NameContext *pNC,
93358 if( NEVER(pExpr==0) || pNC->pSrcList==0 ) return 0;
93372 while( pNC && !pTab ){
93373 SrcList *pTabList = pNC->pSrcList;
93379 pNC = pNC->pNext;
93418 sNC.pNext = pNC;
93419 sNC.pParse = pNC->pParse;
93435 if( pNC->pParse ){
93436 int iDb = sqlite3SchemaToIndex(pNC->pParse->db, pTab->pSchema);
93437 zOriginDb = pNC->pParse->db->aDb[iDb].zName;
93453 sNC.pNext = pNC;
93454 sNC.pParse = pNC->pParse;