Topic: Database Abstraction Layer

With MySQL now owned by Oracle the future of the database must be uncertain. Tying yourself to this storage engine doesn't look wise to me.

I'd like to use SQLite.

If you want an example of DB abstraction that supports MySQL, SQLite and PosgresSQL; look no further the Drupal 7. Yes, they have just added support for the other two DBs.

Re: Database Abstraction Layer

Well, I'm not especially paranoid about the Oracle, so I'm just comfortable with MySQL. Also anybody interested can switch to MariaDB database which is maintained by one of original MySQL designers and in fact it is a fork of MySQL.
But of course if it is still not acceptable for you, you can implement some db engine switching mechanism for FA and we can try to integrate your contribution into core sources smile.

Janusz

Re: Database Abstraction Layer

Currently you're not making abstraction very easy!

MySQL calls occur in:
admin/system_diagnostics.php, admin/inst_upgrade.php, includes/db_pager.inc, includes/current_user.inc, install/save.php,
as well as the includes/db/ directory.
That's with V2.2.11 BTW.

I'd be more than happy to conribute to a SQLite driver once the calls are lumped together. I'd recommend the PDO interface too.

Re: Database Abstraction Layer

Considering 2.2 sources for new development is not right direction: we have now 2.3RC2 released and final 2.3 version is planned at the beginning of December.

Again, please look in the sources - there are only single direct mysq_* calls in files other than connect_db.inc. If you really plan to use other database than MySql with FA, this should be not big problem to fix also those 5 other files.  Especially in comparison with efforts needed to solve problems with differences between SQL dialects used by both db.

Janusz

Re: Database Abstraction Layer

The only sensible way to proceed IMHO is to place all the database calls into a single file or set of files.

Re: Database Abstraction Layer

Yes, you are absolutely right. Move them all into connect_db.inc.

Janusz