1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Further comments on WITH-clause processing routines in select.c.

FossilOrigin-Name: c948384dfdd9f68a832d5a452af44f35337f66e7
This commit is contained in:
drh
2014-01-15 18:35:52 +00:00
parent 60c1a2f0b5
commit c49832c208
4 changed files with 27 additions and 20 deletions

View File

@@ -2640,18 +2640,18 @@ int sqlite3WalkSelectFrom(Walker*, Select*);
#define WRC_Abort 2 /* Abandon the tree walk */
/*
** An instance of this structure represents a set of CTEs (common table
** expressions) created by a single WITH clause.
** An instance of this structure represents a set of on or more CTEs
** (common table expressions) created by a single WITH clause.
*/
struct With {
int nCte; /* Number of CTEs */
int nCte; /* Number of CTEs in the WITH clause */
With *pOuter; /* Containing WITH clause, or NULL */
struct Cte {
char *zName; /* Name of this CTE */
ExprList *pCols; /* List of explicit column names, or NULL */
Select *pSelect; /* The contents of the CTE */
struct Cte *pOuterCte;
Table *pTab;
struct Cte { /* For each CTE in the WITH clause.... */
char *zName; /* Name of this CTE */
ExprList *pCols; /* List of explicit column names, or NULL */
Select *pSelect; /* The definition of this CTE */
struct Cte *pOuterCte; /* Next WITH clause in outer context */
Table *pTab; /* Table object for this CTE */
} a[1];
};