3 SQL::Abstract::Manual::Specification
7 These are the examples for the AST
11 The following are example SQL statements and the AST that would represent each
12 one. The SQL used is from the MySQL dialect.
20 ast_version => 0.0001,
23 type => 'SelectComponent',
33 =item * SELECT NOW() AS time FROM dual AS duality
37 ast_version => 0.0001,
40 type => 'SelectComponent',
52 type => 'TableIdentifier',
61 =item * SELECT 1 FROM foo LEFT OUTER JOIN bar ON ( foo.col1 = bar.col2 )
65 ast_version => 0.0001,
68 type => 'SelectComponent',
81 type => 'TableIdentifier',
88 type => 'TableIdentifier',
100 type => 'Identifier',
105 type => 'Identifier',
114 =item SELECT * FROM foo WHERE name = 'John'
118 ast_version => 0.0001,
121 type => 'SelectComponent',
123 type => 'Identifier',
129 type => 'TableIdentifier',
131 type => 'Identifier',
140 type => 'Identifier',
152 =item SELECT COUNT(*) FROM foo WHERE name = 'John' AND ( title = 'Mr' OR abbrev = 'Dr' )
156 ast_version => 0.0001,
159 type => 'SelectComponent',
161 type => 'Identifier',
167 type => 'TableIdentifier',
169 type => 'Identifier',
182 type => 'Identifier',
204 type => 'Identifier',
219 type => 'Identifier',
220 element1 => 'abbrev',
241 robkinyon: Rob Kinyon C<< <rkinyon@cpan.org> >>
245 You may distribute this code under the same terms as Perl itself.