From: Rob Kinyon Date: Fri, 3 Apr 2009 18:18:10 +0000 (-0400) Subject: The 'as' component of an Alias is now an Identifier X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3004ebb7358fd8e8c133321b666ea7a609a16823;p=dbsrgits%2FSQL-Abstract-2.0-ish.git The 'as' component of an Alias is now an Identifier --- diff --git a/lib/SQL/Abstract/Manual/Examples.pod b/lib/SQL/Abstract/Manual/Examples.pod index a98e890..651134c 100644 --- a/lib/SQL/Abstract/Manual/Examples.pod +++ b/lib/SQL/Abstract/Manual/Examples.pod @@ -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 diff --git a/lib/SQL/Abstract/Manual/Specification.pod b/lib/SQL/Abstract/Manual/Specification.pod index ce616b7..b38ef28 100644 --- a/lib/SQL/Abstract/Manual/Specification.pod +++ b/lib/SQL/Abstract/Manual/Specification.pod @@ -302,7 +302,7 @@ The hash will be structured as follows: { type => 'Alias', value => Expression, - as => String, + as => Identifier, } =head3 Expression