Lines Matching refs:pWith
19516 With *pWith; /* WITH clause attached to this select. Or NULL. */ member
19897 With *pWith; /* Current WITH clause, or NULL */ member
32723 SQLITE_PRIVATE void sqlite3TreeViewWith(TreeView *pView, const With *pWith, u8 moreToFollow){ in sqlite3TreeViewWith() argument
32725 if( pWith==0 ) return; in sqlite3TreeViewWith()
32726 if( pWith->nCte==0 ) return; in sqlite3TreeViewWith()
32727 if( pWith->pOuter ){ in sqlite3TreeViewWith()
32728 sqlite3TreeViewLine(pView, "WITH (0x%p, pOuter=0x%p)",pWith,pWith->pOuter); in sqlite3TreeViewWith()
32730 sqlite3TreeViewLine(pView, "WITH (0x%p)", pWith); in sqlite3TreeViewWith()
32732 if( pWith->nCte>0 ){ in sqlite3TreeViewWith()
32734 for(i=0; i<pWith->nCte; i++){ in sqlite3TreeViewWith()
32737 const struct Cte *pCte = &pWith->a[i]; in sqlite3TreeViewWith()
32758 sqlite3TreeViewItem(pView, zLine, i<pWith->nCte-1); in sqlite3TreeViewWith()
32851 if( p->pWith ){ in sqlite3TreeViewSelect()
32852 sqlite3TreeViewWith(pView, p->pWith, 1); in sqlite3TreeViewSelect()
33618 const With *pWith, in sqlite3TreeViewDelete() argument
33629 if( pWith ) n++; in sqlite3TreeViewDelete()
33635 if( pWith ){ in sqlite3TreeViewDelete()
33637 sqlite3TreeViewWith(pView, pWith, 0); in sqlite3TreeViewDelete()
33674 const With *pWith, in sqlite3TreeViewInsert() argument
33695 if( pWith ) n++; in sqlite3TreeViewInsert()
33702 if( pWith ){ in sqlite3TreeViewInsert()
33704 sqlite3TreeViewWith(pView, pWith, 0); in sqlite3TreeViewInsert()
33744 const With *pWith, in sqlite3TreeViewUpdate() argument
33766 if( pWith ) n++; in sqlite3TreeViewUpdate()
33774 if( pWith ){ in sqlite3TreeViewUpdate()
33776 sqlite3TreeViewWith(pView, pWith, 0); in sqlite3TreeViewUpdate()
35173 pParse->pWith = 0; in sqlite3ErrorMsg()
110969 pNew->pWith = sqlite3WithDup(db, p->pWith);
116971 With *pWith = pSelect->pWith;
116972 if( pWith ){
116976 assert( pWith->nCte>0 );
116977 if( (pWith->a[0].pSelect->selFlags & SF_Expanded)==0 ){
116983 pCopy = sqlite3WithDup(pParse->db, pWith);
116986 for(i=0; i<pWith->nCte; i++){
116987 Select *p = pWith->a[i].pSelect;
116994 sqlite3RenameExprlistUnmap(pParse, pWith->a[i].pCols);
116996 if( pCopy && pParse->pWith==pCopy ){
116997 pParse->pWith = pCopy->pOuter;
120981 if( pSelect->pWith ){
120982 for(i=0; i<pSelect->pWith->nCte; i++){
120983 if( sqlite3WalkSelect(p, pSelect->pWith->a[i].pSelect) ){
127014 With *pWith, /* Existing WITH clause, or NULL */
127022 return pWith;
127028 if( zName && pWith ){
127030 for(i=0; i<pWith->nCte; i++){
127031 if( sqlite3StrICmp(zName, pWith->a[i].zName)==0 ){
127037 if( pWith ){
127038 sqlite3_int64 nByte = sizeof(*pWith) + (sizeof(pWith->a[1]) * pWith->nCte);
127039 pNew = sqlite3DbRealloc(db, pWith, nByte);
127041 pNew = sqlite3DbMallocZero(db, sizeof(*pWith));
127047 pNew = pWith;
127059 SQLITE_PRIVATE void sqlite3WithDelete(sqlite3 *db, With *pWith){
127060 if( pWith ){
127062 for(i=0; i<pWith->nCte; i++){
127063 cteClear(db, &pWith->a[i]);
127065 sqlite3DbFree(db, pWith);
127068 SQLITE_PRIVATE void sqlite3WithDeleteGeneric(sqlite3 *db, void *pWith){
127069 sqlite3WithDelete(db, (With*)pWith);
127982 sqlite3TreeViewDelete(pParse->pWith, pTabList, pWhere,
133870 sqlite3TreeViewInsert(pParse->pWith, pTabList, pColumn, pSelect, pList,
135909 if( pParse->pWith || pSelect->pWith ){
142984 if( OK_IF_ALWAYS_TRUE(p->pWith) ) sqlite3WithDelete(db, p->pWith);
143057 pNew->pWith = 0;
148475 p->pWith = 0;
148513 With *pWith, /* Current innermost WITH clause */
148521 for(p=pWith; p; p=p->pOuter){
148551 SQLITE_PRIVATE With *sqlite3WithPush(Parse *pParse, With *pWith, u8 bFree){
148552 if( pWith ){
148554 pWith = (With*)sqlite3ParserAddCleanup(pParse, sqlite3WithDeleteGeneric,
148555 pWith);
148556 if( pWith==0 ) return 0;
148559 assert( pParse->pWith!=pWith );
148560 pWith->pOuter = pParse->pWith;
148561 pParse->pWith = pWith;
148564 return pWith;
148587 With *pWith; /* The matching WITH */
148590 if( pParse->pWith==0 ){
148612 pCte = searchWith(pParse->pWith, pFrom, &pWith);
148699 pSavedWith = pParse->pWith;
148700 pParse->pWith = pWith;
148707 assert( pRecTerm->pWith==0 );
148708 pRecTerm->pWith = pSel->pWith;
148710 pRecTerm->pWith = 0;
148712 pParse->pWith = pSavedWith;
148717 pParse->pWith = pSavedWith;
148721 pParse->pWith = pWith;
148730 pParse->pWith = pSavedWith;
148746 pParse->pWith = pSavedWith;
148764 if( OK_IF_ALWAYS_TRUE(pParse->pWith) && p->pPrior==0 ){
148765 With *pWith = findRightmost(p)->pWith;
148766 if( pWith!=0 ){
148767 assert( pParse->pWith==pWith || pParse->nErr );
148768 pParse->pWith = pWith->pOuter;
148884 if( pParse->pWith && (p->selFlags & SF_View) ){
148885 if( p->pWith==0 ){
148886 p->pWith = (With*)sqlite3DbMallocZero(db, sizeof(With));
148887 if( p->pWith==0 ){
148891 p->pWith->bView = 1;
148893 sqlite3WithPush(pParse, p->pWith, 0);
153659 sqlite3TreeViewUpdate(pParse->pWith, pTabList, pChanges, pWhere,
172596 static Select *attachWithToSelect(Parse *pParse, Select *pSelect, With *pWith){
172598 pSelect->pWith = pWith;
172601 sqlite3WithDelete(pParse->db, pWith);