Genezzo
view release on metacpan or search on metacpan
lib/Genezzo/Parse/SQL.pm view on Meta::CPAN
# The argument is a string which contains a SQL query
# (without a trailing semicolon).
# The output is nested hash structure of the abstract
# syntax tree.
my $sql_tree = $parser->sql_000($some_sql_statement);
# dump out the parse tree
print Data::Dumper->Dumper([$sql_tree],['sql_tree']);
=head1 DESCRIPTION
The SQL parser is a L<Parse::RecDescent> parser generated by
L<Genezzo::Parse::SQLGrammar>. It shouldn't be looked at with
human eyes.
Still reading this? You must be a glutton for punishment.
This parser handles a fair bit of SQL92, but the error handling
is somewhat lacking.
=head1 ARGUMENTS
=head1 FUNCTIONS
=head2 EXPORT
=over 4
=back
=head1 LIMITATIONS
No support for DDL, ANSI Interval, Date, Timestamp, etc.
=head1 TODO
=over 4
=item alter table (elcaro MODIFY column NOT NULL) vs (sql3 ALTER COLUMN)...
=item Support for DDL, ANSI Interval, Date, Timestamp, etc.
=item fix the extra array deref in join rules
=item error messages everywhere
=item ECOUNT reserved word issues
=item TRIM, UPPER, etc in standard function list?
=item use of negative lookahead in reserved_word regex?
=item table constraint, storage clause
=item constraint attributes - deferrable, disable
=item delete cascade referential action
=item maybe can collapse qualified join with qj_leftop?
=item table expr optional column list
=item "system" literals like USER, SYSDATE
=item better separation of strings and numbers (see concatenate)
=item leading NOT
=item double colon in function names?
=back
=head1 AUTHOR
Jeffrey I. Cohen, jcohen@genezzo.com
=head1 SEE ALSO
L<perl(1)>.
Copyright (c) 2005,2006 Jeffrey I Cohen. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Address bug reports and comments to: jcohen@genezzo.com
For more information, please visit the Genezzo homepage
at L<http://www.genezzo.com>
=cut
# Generated by SQLGrammar.pl on Tue Nov 20 00:23:25 2007
( run in 0.791 second using v1.01-cache-2.11-cpan-2398b32b56e )