Added example of DELETE
[dbsrgits/SQL-Abstract-2.0-ish.git] / lib / SQL / Abstract / Manual / Specification.pod
index 32281db..c201c51 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
 
@@ -440,33 +440,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.
@@ -508,27 +502,44 @@ The number corresponds to a column in the select clause.
 This corresponds to the clause that is used in some RDBMS engines to limit the
 number of rows returned by a query. In MySQL, this would be the LIMIT clause.
 
-A rows clause is composed as follows:
+The hash for a rows clause is composed as follows:
 
-  Number [, Number ]
+  {
+      start => Number,
+      count => Number,
+  }
+
+The start attribute, if ommitted, will default to 0. The count attribute is
+optional.
 
 =head3 for
 
 This corresponds to the clause that is used in some RDBMS engines to indicate
 what locks are to be taken by this SELECT statement.
 
-A for clause is composed as follows:
+The hash for a for clause is composed as follows:
 
-  UPDATE | DELETE
+  {
+      value => '< UPDATE | DELETE >',
+  }
 
 =head3 connectby
 
 This corresponds to the clause that is used in some RDBMS engines to provide for
 an adjacency-list query.
 
-A connectby clause is composed as follows:
+The hash for a for clause is composed as follows:
+
+  {
+      start_with => ExpressionList,
+      connect_by => {
+          option => '< PRIOR | NOCYCLE >'
+          cond   => ExpressionList,
+      },
+      order_siblings => orderby-clause,
+  }
 
-  Identifier, WhereExpression
+Both the start_with and order_siblings clauses are optional.
 
 =head1 TODO