Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: In search of an efficient query abstractor

by CountZero (Bishop)
on Dec 07, 2008 at 22:37 UTC ( #728807=note: print w/replies, xml ) Need Help??


in reply to Re^2: In search of an efficient query abstractor
in thread In search of an efficient query abstractor

SQL::Statement also understands INSERT statements but unfortunately it will choke on multiple sets of VALUES. So you would have to collapse these into one beforehand anyhow, which of course sort-of defeats the use of this module ...

May be you can petition the module's author jZED to extend it to include this case?

If you want to parse the SQL statements yourself, it can do no harm to look at the code of DBI::SQL::Nano which has a nice (but limited) set of regexes that parse them and it shouldn't be too difficult to expend these, although to parse the full MySQL grammar you will probably need something like Parse::RecDescent or Parse::Yapp.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://728807]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2021-06-13 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (54 votes). Check out past polls.

    Notices?