Lines Matching refs:pWith
20600 With *pWith; /* WITH clause attached to this select. Or NULL. */ member
20987 With *pWith; /* Current WITH clause, or NULL */ member
34128 SQLITE_PRIVATE void sqlite3TreeViewWith(TreeView *pView, const With *pWith, u8 moreToFollow){ in sqlite3TreeViewWith() argument
34130 if( pWith==0 ) return; in sqlite3TreeViewWith()
34131 if( pWith->nCte==0 ) return; in sqlite3TreeViewWith()
34132 if( pWith->pOuter ){ in sqlite3TreeViewWith()
34133 sqlite3TreeViewLine(pView, "WITH (0x%p, pOuter=0x%p)",pWith,pWith->pOuter); in sqlite3TreeViewWith()
34135 sqlite3TreeViewLine(pView, "WITH (0x%p)", pWith); in sqlite3TreeViewWith()
34137 if( pWith->nCte>0 ){ in sqlite3TreeViewWith()
34139 for(i=0; i<pWith->nCte; i++){ in sqlite3TreeViewWith()
34142 const struct Cte *pCte = &pWith->a[i]; in sqlite3TreeViewWith()
34163 sqlite3TreeViewItem(pView, zLine, i<pWith->nCte-1); in sqlite3TreeViewWith()
34265 if( p->pWith ){ in sqlite3TreeViewSelect()
34266 sqlite3TreeViewWith(pView, p->pWith, 1); in sqlite3TreeViewSelect()
35025 const With *pWith, in sqlite3TreeViewDelete() argument
35036 if( pWith ) n++; in sqlite3TreeViewDelete()
35042 if( pWith ){ in sqlite3TreeViewDelete()
35044 sqlite3TreeViewWith(pView, pWith, 0); in sqlite3TreeViewDelete()
35081 const With *pWith, in sqlite3TreeViewInsert() argument
35102 if( pWith ) n++; in sqlite3TreeViewInsert()
35109 if( pWith ){ in sqlite3TreeViewInsert()
35111 sqlite3TreeViewWith(pView, pWith, 0); in sqlite3TreeViewInsert()
35151 const With *pWith, in sqlite3TreeViewUpdate() argument
35173 if( pWith ) n++; in sqlite3TreeViewUpdate()
35181 if( pWith ){ in sqlite3TreeViewUpdate()
35183 sqlite3TreeViewWith(pView, pWith, 0); in sqlite3TreeViewUpdate()
36622 pParse->pWith = 0; in sqlite3ErrorMsg()
114630 pNew->pWith = sqlite3WithDup(db, p->pWith);
121182 With *pWith = pSelect->pWith; local
121183 if( pWith ){
121187 assert( pWith->nCte>0 );
121188 if( (pWith->a[0].pSelect->selFlags & SF_Expanded)==0 ){
121194 pCopy = sqlite3WithDup(pParse->db, pWith);
121197 for(i=0; i<pWith->nCte; i++){
121198 Select *p = pWith->a[i].pSelect;
121205 sqlite3RenameExprlistUnmap(pParse, pWith->a[i].pCols);
121207 if( pCopy && pParse->pWith==pCopy ){
121208 pParse->pWith = pCopy->pOuter;
125947 if( pSelect->pWith ){
125948 for(i=0; i<pSelect->pWith->nCte; i++){
125949 if( sqlite3WalkSelect(p, pSelect->pWith->a[i].pSelect) ){
132080 With *pWith, /* Existing WITH clause, or NULL */ argument
132088 return pWith;
132094 if( zName && pWith ){
132096 for(i=0; i<pWith->nCte; i++){
132097 if( sqlite3StrICmp(zName, pWith->a[i].zName)==0 ){
132103 if( pWith ){
132104 pNew = sqlite3DbRealloc(db, pWith, SZ_WITH(pWith->nCte+1));
132112 pNew = pWith;
132124 SQLITE_PRIVATE void sqlite3WithDelete(sqlite3 *db, With *pWith){ argument
132125 if( pWith ){
132127 for(i=0; i<pWith->nCte; i++){
132128 cteClear(db, &pWith->a[i]);
132130 sqlite3DbFree(db, pWith);
132133 SQLITE_PRIVATE void sqlite3WithDeleteGeneric(sqlite3 *db, void *pWith){ argument
132134 sqlite3WithDelete(db, (With*)pWith);
133056 sqlite3TreeViewDelete(pParse->pWith, pTabList, pWhere,
139668 sqlite3TreeViewInsert(pParse->pWith, pTabList, pColumn, pSelect, pList,
141709 if( pParse->pWith || pSelect->pWith ){
148865 if( OK_IF_ALWAYS_TRUE(p->pWith) ) sqlite3WithDelete(db, p->pWith);
148936 pNew->pWith = 0;
154336 p->pWith = 0;
154374 With *pWith, /* Current innermost WITH clause */ argument
154382 for(p=pWith; p; p=p->pOuter){
154412 SQLITE_PRIVATE With *sqlite3WithPush(Parse *pParse, With *pWith, u8 bFree){ argument
154413 if( pWith ){
154415 pWith = (With*)sqlite3ParserAddCleanup(pParse, sqlite3WithDeleteGeneric,
154416 pWith);
154417 if( pWith==0 ) return 0;
154420 assert( pParse->pWith!=pWith );
154421 pWith->pOuter = pParse->pWith;
154422 pParse->pWith = pWith;
154425 return pWith;
154448 With *pWith; /* The matching WITH */ local
154451 if( pParse->pWith==0 ){
154474 pCte = searchWith(pParse->pWith, pFrom, &pWith);
154566 pSavedWith = pParse->pWith;
154567 pParse->pWith = pWith;
154574 assert( pRecTerm->pWith==0 );
154575 pRecTerm->pWith = pSel->pWith;
154577 pRecTerm->pWith = 0;
154579 pParse->pWith = pSavedWith;
154584 pParse->pWith = pSavedWith;
154588 pParse->pWith = pWith;
154597 pParse->pWith = pSavedWith;
154613 pParse->pWith = pSavedWith;
154631 if( OK_IF_ALWAYS_TRUE(pParse->pWith) && p->pPrior==0 ){
154632 With *pWith = findRightmost(p)->pWith; local
154633 if( pWith!=0 ){
154634 assert( pParse->pWith==pWith || pParse->nErr );
154635 pParse->pWith = pWith->pOuter;
154754 if( pParse->pWith && (p->selFlags & SF_View) ){
154755 if( p->pWith==0 ){
154756 p->pWith = (With*)sqlite3DbMallocZero(db, SZ_WITH(1) );
154757 if( p->pWith==0 ){
154761 p->pWith->bView = 1;
154763 sqlite3WithPush(pParse, p->pWith, 0);
159890 sqlite3TreeViewUpdate(pParse->pWith, pTabList, pChanges, pWhere,
179752 static Select *attachWithToSelect(Parse *pParse, Select *pSelect, With *pWith){ argument
179754 pSelect->pWith = pWith;
179757 sqlite3WithDelete(pParse->db, pWith);