Lines Matching refs:pWith

19973   With *pWith;           /* WITH clause attached to this select. Or NULL. */  member
20365 With *pWith; /* Current WITH clause, or NULL */ member
33292 SQLITE_PRIVATE void sqlite3TreeViewWith(TreeView *pView, const With *pWith, u8 moreToFollow){ in sqlite3TreeViewWith() argument
33294 if( pWith==0 ) return; in sqlite3TreeViewWith()
33295 if( pWith->nCte==0 ) return; in sqlite3TreeViewWith()
33296 if( pWith->pOuter ){ in sqlite3TreeViewWith()
33297 sqlite3TreeViewLine(pView, "WITH (0x%p, pOuter=0x%p)",pWith,pWith->pOuter); in sqlite3TreeViewWith()
33299 sqlite3TreeViewLine(pView, "WITH (0x%p)", pWith); in sqlite3TreeViewWith()
33301 if( pWith->nCte>0 ){ in sqlite3TreeViewWith()
33303 for(i=0; i<pWith->nCte; i++){ in sqlite3TreeViewWith()
33306 const struct Cte *pCte = &pWith->a[i]; in sqlite3TreeViewWith()
33327 sqlite3TreeViewItem(pView, zLine, i<pWith->nCte-1); in sqlite3TreeViewWith()
33425 if( p->pWith ){ in sqlite3TreeViewSelect()
33426 sqlite3TreeViewWith(pView, p->pWith, 1); in sqlite3TreeViewSelect()
34185 const With *pWith, in sqlite3TreeViewDelete() argument
34196 if( pWith ) n++; in sqlite3TreeViewDelete()
34202 if( pWith ){ in sqlite3TreeViewDelete()
34204 sqlite3TreeViewWith(pView, pWith, 0); in sqlite3TreeViewDelete()
34241 const With *pWith, in sqlite3TreeViewInsert() argument
34262 if( pWith ) n++; in sqlite3TreeViewInsert()
34269 if( pWith ){ in sqlite3TreeViewInsert()
34271 sqlite3TreeViewWith(pView, pWith, 0); in sqlite3TreeViewInsert()
34311 const With *pWith, in sqlite3TreeViewUpdate() argument
34333 if( pWith ) n++; in sqlite3TreeViewUpdate()
34341 if( pWith ){ in sqlite3TreeViewUpdate()
34343 sqlite3TreeViewWith(pView, pWith, 0); in sqlite3TreeViewUpdate()
35775 pParse->pWith = 0; in sqlite3ErrorMsg()
112317 pNew->pWith = sqlite3WithDup(db, p->pWith);
118595 With *pWith = pSelect->pWith;
118596 if( pWith ){
118600 assert( pWith->nCte>0 );
118601 if( (pWith->a[0].pSelect->selFlags & SF_Expanded)==0 ){
118607 pCopy = sqlite3WithDup(pParse->db, pWith);
118610 for(i=0; i<pWith->nCte; i++){
118611 Select *p = pWith->a[i].pSelect;
118618 sqlite3RenameExprlistUnmap(pParse, pWith->a[i].pCols);
118620 if( pCopy && pParse->pWith==pCopy ){
118621 pParse->pWith = pCopy->pOuter;
122625 if( pSelect->pWith ){
122626 for(i=0; i<pSelect->pWith->nCte; i++){
122627 if( sqlite3WalkSelect(p, pSelect->pWith->a[i].pSelect) ){
128738 With *pWith, /* Existing WITH clause, or NULL */
128746 return pWith;
128752 if( zName && pWith ){
128754 for(i=0; i<pWith->nCte; i++){
128755 if( sqlite3StrICmp(zName, pWith->a[i].zName)==0 ){
128761 if( pWith ){
128762 pNew = sqlite3DbRealloc(db, pWith, SZ_WITH(pWith->nCte+1));
128770 pNew = pWith;
128782 SQLITE_PRIVATE void sqlite3WithDelete(sqlite3 *db, With *pWith){
128783 if( pWith ){
128785 for(i=0; i<pWith->nCte; i++){
128786 cteClear(db, &pWith->a[i]);
128788 sqlite3DbFree(db, pWith);
128791 SQLITE_PRIVATE void sqlite3WithDeleteGeneric(sqlite3 *db, void *pWith){
128792 sqlite3WithDelete(db, (With*)pWith);
129713 sqlite3TreeViewDelete(pParse->pWith, pTabList, pWhere,
135806 sqlite3TreeViewInsert(pParse->pWith, pTabList, pColumn, pSelect, pList,
137847 if( pParse->pWith || pSelect->pWith ){
144932 if( OK_IF_ALWAYS_TRUE(p->pWith) ) sqlite3WithDelete(db, p->pWith);
145005 pNew->pWith = 0;
150495 p->pWith = 0;
150533 With *pWith, /* Current innermost WITH clause */
150541 for(p=pWith; p; p=p->pOuter){
150571 SQLITE_PRIVATE With *sqlite3WithPush(Parse *pParse, With *pWith, u8 bFree){
150572 if( pWith ){
150574 pWith = (With*)sqlite3ParserAddCleanup(pParse, sqlite3WithDeleteGeneric,
150575 pWith);
150576 if( pWith==0 ) return 0;
150579 assert( pParse->pWith!=pWith );
150580 pWith->pOuter = pParse->pWith;
150581 pParse->pWith = pWith;
150584 return pWith;
150607 With *pWith; /* The matching WITH */
150610 if( pParse->pWith==0 ){
150633 pCte = searchWith(pParse->pWith, pFrom, &pWith);
150725 pSavedWith = pParse->pWith;
150726 pParse->pWith = pWith;
150733 assert( pRecTerm->pWith==0 );
150734 pRecTerm->pWith = pSel->pWith;
150736 pRecTerm->pWith = 0;
150738 pParse->pWith = pSavedWith;
150743 pParse->pWith = pSavedWith;
150747 pParse->pWith = pWith;
150756 pParse->pWith = pSavedWith;
150772 pParse->pWith = pSavedWith;
150790 if( OK_IF_ALWAYS_TRUE(pParse->pWith) && p->pPrior==0 ){
150791 With *pWith = findRightmost(p)->pWith;
150792 if( pWith!=0 ){
150793 assert( pParse->pWith==pWith || pParse->nErr );
150794 pParse->pWith = pWith->pOuter;
150913 if( pParse->pWith && (p->selFlags & SF_View) ){
150914 if( p->pWith==0 ){
150915 p->pWith = (With*)sqlite3DbMallocZero(db, SZ_WITH(1) );
150916 if( p->pWith==0 ){
150920 p->pWith->bView = 1;
150922 sqlite3WithPush(pParse, p->pWith, 0);
155821 sqlite3TreeViewUpdate(pParse->pWith, pTabList, pChanges, pWhere,
175425 static Select *attachWithToSelect(Parse *pParse, Select *pSelect, With *pWith){
175427 pSelect->pWith = pWith;
175430 sqlite3WithDelete(pParse->db, pWith);