View on
MetaCPAN
search.cpan.org is shutting down
For details read Perl NOC. After June 25th this page will redirect to MetaCPAN.org
Jeffrey Cohen > Genezzo > Genezzo::Parse::SQL

Download:
Genezzo-0.72.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Source  

NAME ^

Genezzo::Parse::SQL - SQL parser

SYNOPSIS ^

 use Genezzo::Parse::SQL;
 use Parse::RecDescent;
 use Data::Dumper;

 # load the precompiled parser
 my $parser   = Genezzo::Parse::SQL->new();

 # sql_000 is parser entry point.
 # 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']);

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.

ARGUMENTS ^

FUNCTIONS ^

EXPORT

LIMITATIONS ^

 No support for DDL, ANSI Interval, Date, Timestamp, etc.

TODO ^

alter table (elcaro MODIFY column NOT NULL) vs (sql3 ALTER COLUMN)...
Support for DDL, ANSI Interval, Date, Timestamp, etc.
fix the extra array deref in join rules
error messages everywhere
ECOUNT reserved word issues
TRIM, UPPER, etc in standard function list?
use of negative lookahead in reserved_word regex?
table constraint, storage clause
constraint attributes - deferrable, disable
delete cascade referential action
maybe can collapse qualified join with qj_leftop?
table expr optional column list
"system" literals like USER, SYSDATE
better separation of strings and numbers (see concatenate)
leading NOT
double colon in function names?

AUTHOR ^

Jeffrey I. Cohen, jcohen@genezzo.com

SEE ALSO ^

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 http://www.genezzo.com

syntax highlighting: