The new database system for Drupal 7 that I've been talking about for the past few months is nearly ready for submission. With chx's visit to Chicago we were able to refactor it for far better modularity and cleanliness. As of yesterday, the system is able to navigate around Drupal, submit forms, create and edit nodes, and view the insanely heavy modules admin page. I still need to make it work with the installer, but it's looking very promising. A very recent copy of the new code base, pre-Drupal-integration, is available in my sandbox.
Here's a brief list of the features it offers:
- Ability to connect to multiple database types at the same time.
- Type-agnostic prepared statements. No more worrying about %s vs. %d!
- Master/slave replication support.
- Master/master replication support (or at least the potential for it).
- "INSERT ... ON DUPLICATE KEY UPDATE ..." support for MySQL, with emulation on other databases.
- The potential for database drivers to be added by contrib authors without modifying core, not even the installer.
- A flexible, versatile query builder. (Raw db_query() is still there, though!)
- The ability to drupal_alter queries, which means the abomination that is db_rewrite_sql() can be removed.
- Not a single regex or global variable.
I hope to have a patch ready to test within the next few days.