NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
DBI::DBD (Score:3, Informative)
The canonical documentation for DBD writers is DBI::DBD [cpan.org].
--David
Reply to This
My experiences writing DBD::google (Score:2, Informative)
When I started writing
DBD::google, there was only one thing to go by:DBI::DBD, which gives a basic but servicable intro to writing a DBD. Since then, Takanori Kawai releasedDBD::Template, which provides a pretty good starting point, mostly (it seems) encapsulating the good advice fromDBI::DBD.As far as
SQL::Statementgoes, I initially wroteDBD::googlewithout it, but am rewriting it to subclassSQL::Parserand implement it's own feature set, which (SELECT-wise) is a superset of ANSI SQL, but in all(darren)
secret project (Score:1)
Re:secret project (Score:2)
Has anyone considered a Parse::RecDescent based SQL parser?
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re:secret project (Score:1)
Take a look at
SQL::Translator(on CPAN [cpan.org], also at http://sf.net/projects/sqlfairy/ [sf.net]), which is a set of modules designed to translate the CREATE syntax of one DB into another. Many of the parsers we currently have (MySQL, Sybase, Pg, Oracle) are based on Parse::RecDescent.(darren)
Re:secret project (Score:1)
Random thought: would it make any sense to skip ahead a bit by poking around in the source of open source databases like MySQL & PostgreSQL and using their SQL parsing code as the basis for a general purpose SQL interpreter?
--
DO NOT LEAVE IT IS NOT REAL.
Re:secret project (Score:1)
The SQL::Translator [cpan.org] folks have discussed (OK, I brought it up [sourceforge.net]) using the provided yacc grammars as the basis for the MySQL and Pg parsers, although none of us has done anything with it yet.
Patches welcome... [sf.net]
(darren)
Re:secret project (Score:1)
--
DO NOT LEAVE IT IS NOT REAL.
Re:secret project (Score:1)
I had a conversation about this very topic with Jeff Zucker a few weeks ago, because I had the same issues with
SQL::Statement. He pointed me atSQL::Parser, upon whichSQL::Statementis based, and which is much more flexible. You simply need to subclassSQL::Parser, and override the methods that aren't flexible enough for you.Also, the guts of
SQL::Parserare regex-based, and Jeff seems pretty open to accepting id(darren)