Are there any modules for generating SQL queries?
I have some prototype code for generating simple queries,
wyhere fields, sorting order, and where clauses with a mix of ANDs and ORs can be specified. But before I continue on this track....is there already such a module?
I've found Text::Query::BuildSQL,
but this uses AltaVista-like syntax and isn't what I'm looking for.
The reason I want more detailed functionality is so that
- I can specify a nifty search widget for specific tables on the web that lets the user choose fields to view, filter by, and sorting order (with appropriate validation for security protection, of course);
- I can also re-use a lot of this code for various classes/objects which work on these tables;
- And in some ways, it makes the code more readible than to inline an SQL statement.