http://www.perlmonks.org?node_id=704621


in reply to Re: Considering future support for different databases.
in thread Considering future support for different databases.

That's an interesting example, but I don't think I'd like dealing with it that way. It looks like it could be more work (figuring out the individual features each database supports, especially for complicated queries), and I don't think it's very readable.
  • Comment on Re^2: Considering future support for different databases.

Replies are listed 'Best First'.
Re^3: Considering future support for different databases.
by mr_mischief (Monsignor) on Aug 19, 2008 at 14:27 UTC
    It wouldn't have to be all methods. You could use a hash for each database, with keys for the capabilities and the actual SQL you need for your particular action. These could be complete with the placeholders already present. Then, you could assign a reference to the proper hash for your DBM to a global scalar. OTOH, a good reusable framework takes a lot of work, and there are a few to choose from that have that work already done.