in reply to Re: Database abstraction including data types ( $dbh->{pg_bool_tf} )
in thread Database abstraction including data types

Aternatively do it all in the database:

SELECT CASE WHEN column_name THEN 1 ELSE 0 END AS column_name FROM table ...

Replies are listed 'Best First'.
Re^3: Database abstraction including data types
by Anonymous Monk on May 20, 2012 at 21:06 UTC
    By the way, that whole app looks like a good candidate for SQLite which could simplify the configuration and management a bit.

      I'm not sure how many people actually use SQLite for their Postfix installation. Postfix supports it but Postfixadmin doesn't so I suppose there has been little demand. It would probably work with mostly the same SQL as MySQL except for the DDL. But given that I'd have to support the "big ones" too as that's what most people use, I don't quite see how it would simplify things?