in reply to Re: How to manage sql statements
in thread How to manage sql statements

I had a good search around a few weeks back and thought that DBIx::Abstract was the best option. However, I found that I was having to bypass the abstraction a lot of the time because my statements were too complex.

This article is a good example of the type of idea that could be abstracted (even if I don't understand it all). It shows how data manipulations that are quite easy to express end up being fiendishly complicated sql.

VSarkiss's perlsql hybrid example was the way I expected to write sql when I first started down the perl/sql path. Just hook into a module and say...
use SQL::GenericStatements qw(count_duplicates, cross_tab); $result = count_duplicates($dbh, $table, @columns); $result = cross_tab($dbh, @tables);
With VSarkiss's pseudo code under the hood. Another example is the lack of a subselect in mysql. What about a "converter" of sql that overcomes the specific driver limitations.

Seems like a *lot* of work though...

tonyday