From: Rob Kinyon <rkinyon@rkinyon-lt-osx.local>
Date: Sun, 29 Mar 2009 03:13:23 +0000 (-0400)
Subject: Added INSERT with example
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=338df86b467cc393bf9ac799b10a0b9803fac56b;p=dbsrgits%2FSQL-Abstract-2.0-ish.git

Added INSERT with example
---

diff --git a/lib/SQL/Abstract/Manual/Examples.pod b/lib/SQL/Abstract/Manual/Examples.pod
index 4f69af8..1080cc1 100644
--- a/lib/SQL/Abstract/Manual/Examples.pod
+++ b/lib/SQL/Abstract/Manual/Examples.pod
@@ -432,6 +432,40 @@ one. The SQL used is from the MySQL dialect.
       ],
   }
 
+=item * INSERT INTO foo ( col1, col2 ) VALUES ( 1, 3 )
+
+  {
+      type => 'insert',
+      ast_version => 0.0001,
+      tables => {
+          type => 'TableIdentifier',
+          value => {
+              type => 'Identifier',
+              element1 => 'foo',
+          },
+      },
+      columns => [
+          {
+              type => 'Identifier,
+              element1 => 'col1',
+          },
+          {
+              type => 'Identifier,
+              element1 => 'col2',
+          },
+      ],
+      values => [
+          {
+              type => 'Number,
+              value => '1',
+          },
+          {
+              type => 'Number,
+              value => '3',
+          },
+      ],
+  }
+
 =back
 
 =head1 AUTHORS
diff --git a/lib/SQL/Abstract/Manual/Specification.pod b/lib/SQL/Abstract/Manual/Specification.pod
index 2e2fdbc..77d4e72 100644
--- a/lib/SQL/Abstract/Manual/Specification.pod
+++ b/lib/SQL/Abstract/Manual/Specification.pod
@@ -454,23 +454,13 @@ The hash for SetComponent unit is composed as follows:
 
 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.