The 'as' component of an Alias is now an Identifier
[dbsrgits/SQL-Abstract-2.0-ish.git] / lib / SQL / Abstract / Manual / Examples.pod
index a98e890..651134c 100644 (file)
@@ -39,7 +39,10 @@ one. The SQL used is from the MySQL dialect.
                   type     => 'Function',
                   function => 'NOW',
               },
-              as => 'time',
+              as => {
+                  type => 'Identifier',
+                  element1 => 'time',
+              },
           },
       ],
       tables => {
@@ -48,7 +51,10 @@ one. The SQL used is from the MySQL dialect.
               type => 'Identifier',
               element1 => 'dual',
           },
-          as => 'duality',
+          as => {
+              type => 'Identifier',
+              element1 => 'duality',
+          },
       },
   }
 
@@ -447,6 +453,38 @@ one. The SQL used is from the MySQL dialect.
       },
   }
 
+=item * SELECT * FROM ( SELECT 1 ) AS foo
+
+  {
+      type => 'select',
+      ast_version => 0.0001,
+      select => [
+          {
+              type => 'Identifier',
+              element1 => '*',
+          },
+      ],
+      tables => {
+          type => 'Identifier',
+          element1 => 'foo',
+          value => {
+              type => 'select',
+              ast_version => 0.0001,
+              select => [
+                  {
+                      type    => 'Value',
+                      subtype => 'Number',
+                      value   => 1,
+                  },
+              ],
+          },
+          as => {
+              type => 'Identifier',
+              element1 => 'foo',
+          },
+      },
+  }
+
 =back
 
 =head1 AUTHORS