Removed ExpressionList as a useless unit type
[dbsrgits/SQL-Abstract-2.0-ish.git] / lib / SQL / Abstract / Manual / Specification.pod
index f9e1f32..41c389c 100644 (file)
@@ -205,8 +205,8 @@ be careful to I<not> quote asterisks.
 
 =head3 Value
 
-A Value is a Perl scalar. Depending on the type, a Visitor may be able to make
-certain decisions.
+A Value is a Perl scalar. Depending on the subtype, a Visitor may be able to
+make certain decisions. The following are the minimally-valid subtypes:
 
 =over 4
 
@@ -258,7 +258,9 @@ The hash will be structured as follows:
   {
       type => 'Operator',
       op   => String,
-      args => ExpressionList,
+      args => [
+          Expression,
+      ],
   }
 
 Operators have a cardinality, or expected number of arguments. Some operators,
@@ -309,22 +311,6 @@ An Expression can be any one of the following:
 An Expression is a meta-syntactic unit. An "Expression" unit will never appear
 within the AST. It acts as a junction.
 
-=head3 ExpressionList
-
-An ExpressionList is a list of Expressions, generally separated by commas
-(though other separators may be appropriate at times or for different SQL
-dialects). An null separator may also be used.
-
-The hash for an ExpressionList is as follows:
-
-  {
-      type      => 'ExpressionList',
-      separator => ',',
-      elements  =>  Array of Expressions,
-  }
-
-An ExpressionList is always rendered in SQL with parentheses around it.
-
 =head3 Nesting
 
 There is no specific operator or nodetype for nesting. Instead, nesting is
@@ -440,33 +426,27 @@ A where clause is composed of an Expression.
 
 This corresponds to the SET clause in an INSERT or UPDATE statement.
 
-A set clause is composed as follows:
+A set clause unit is an array of one or more SetComponent units.
 
-  SetComponent := Identifier = Expression
+The hash for SetComponent unit is composed as follows:
 
-  SetComponent [ , SetComponent ]*
+  {
+      type => 'SetComponent',
+      col  => Identifier,
+      value => Expression,
+  }
 
 =head3 columns
 
 This corresponds to the optional list of columns in an INSERT statement.
 
-A columns clause is an IdentifierList and the unit is composed as follows:
-
-  columns => [
-      Identifier,
-      [ Identifier, ]*
-  ],
+A columns clause unit is an array of one or more Identifier units.
 
 =head3 values
 
 This corresponds to the VALUES clause in an INSERT statement.
 
-A values clause is an ExpressionList and the unit is composed as follows:
-
-  values => [
-      Expression,
-      [ Expression, ]*
-  ],
+A values clause unit is an array of one or more Expression units.
 
 If there is a columns clause, the number of entries in the values clause must be
 equal to the number of entries in the columns clause.
@@ -511,7 +491,6 @@ number of rows returned by a query. In MySQL, this would be the LIMIT clause.
 The hash for a rows clause is composed as follows:
 
   {
-      type => 'Rows',
       start => Number,
       count => Number,
   }
@@ -538,10 +517,14 @@ an adjacency-list query.
 The hash for a for clause is composed as follows:
 
   {
-      start_with => ExpressionList,
+      start_with => [
+          Expression,
+      ],
       connect_by => {
           option => '< PRIOR | NOCYCLE >'
-          cond   => ExpressionList,
+          cond => [
+              Expression,
+          ],
       },
       order_siblings => orderby-clause,
   }