In the following select : select t.x from t t.x is a select element and t is it's origin Here q.z1 is a SelectElement who's origin is t select q.z1 from (select t.x as z1 from t) q
In the following select : select t.x from t t.x is a select element and t is it's origin Here q.z1 is a SelectElement who's origin is t select q.z1 from (select t.x as z1 from t) q
strictly for logging purposes, i.e.
strictly for logging purposes, i.e. to display a more explicit AST
Update, Insert, and Delete statements are always at the root of an AST, so they are never aliased, but then can have sub queries, ex.: update ...
Update, Insert, and Delete statements are always at the root of an AST, so they are never aliased, but then can have sub queries, ex.: update ... where x in (subquery). Name clashes are impossible since SelectElements of query are always aliased.
visitor's args are : -the visited node, -it's parent -it's depth
visitor's args are : -the visited node, -it's parent -it's depth
SelectElement are elements of a select list, for example they are a,b, and c in :
select a,b,c from T
they are either ValueSelectElement for composite expressions, i.e. select (x / 2) * y as Z from .... TupleSelectElement for group by or compute elements (TODO: document group by/compute) FieldSelectElement for table columns (that map to fields)
ExportSelectElement for a select element that refers to a SelectElement of an inner or outer query.
SelectElementReference are nodes in any clause other than select (where, having, composite expression, order by, etc) that refer to a SelectElement