matrixmadhan has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,
Are there any CPAN modules that are available to create SQL queries from a data structure?

I searched for one in CPAN, but could not locate any such module.

I wish there was such a module to construct queries.

Any ideas?

Replies are listed 'Best First'.
Re: CPAN module - to create SQL queries
by Your Mother (Archbishop) on Dec 12, 2008 at 07:20 UTC

    SQL::Abstract: Generate SQL from Perl data structures. It has a few blind spots in tricky stuff but it does vanilla and lots of extras very well and intuitively out of the box. You might go whole hog and look at a kit like DBIx::Class (which uses SQL::Abstract) or Rose::DB too.

      Thank you very much for the reply, that seems to be doing most of the work that I would like to do as part of constructing queries.

      Thanks once again, I will look into that.
Re: CPAN module - to create SQL queries
by perrin (Chancellor) on Dec 12, 2008 at 08:21 UTC