Quoting Pierre Rineau pierre.rineau@makina-corpus.com:
On mer, 2008-07-30 at 09:47 -0400, Earnie Boyd wrote:
What an odd sentence. Drupal doesn't need to use classes and instantiation to resolve this bit of hardship. It just needs to use the database type to resolve which function to hook from the global function name. So I call db_query() in my module but that will call db_query_mysql() or db_query_pgsql() dependent on the type of the DB active at the time. Currently the design declares the same db_query() function within more than one file which is really sad.
Yes, I agree with that, this was a wonderfull troll :)
But it should go with a dynamic database type resolving based on active database type.
It really could be easy to implement.
Such a patch should wait on http://drupal.org/node/225450 to be committed which means that it this easy implementation might need to wait on D8. If someone wants to beat me to a patch go ahead; this is open source country.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/