in reply to RFC: Simple DBI abstraction

The idea of having only one method, which itself decides whether you want to do a SELECT, INSERT or UPDATE is rather well-found.

On the other hand, the fact that you can only search on "equal" and not on "like" or other operators, seems artificially limiting. Id. goes for only using "AND" between search terms.

Perhaps if one provided a scalar instead of a hash ref as second argument, this would signal that in this scalar is to be found a verbatim "WHERE"-clause to be used as such.

Mind you , it would make your module less secure as it would be possible to inject arbitrary SQL-code into the statement!

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Replies are listed 'Best First'.
Re^2: RFC: Simple DBI abstraction
by Jaap (Curate) on Sep 08, 2004 at 21:52 UTC
    Thanks for your comment, CountZero. I'm bothered by the lack of like searches just like you. Still thinking about that. As for the AND/OR: i find myself using AND 90% of the time, but i'm gonna think about it. You could always do 2 separate searches though.