We should considering deprecating/reducing use of/removing DBTNG in Backdrop to accomplish the following goals: - Improve performance by removing abstraction around constructing queries. - Improve learnability by avoiding a Drupal-specific abstraction layer and syntax.
This introduces a need for substitutes in a number of places however: - Alterability: Remove the ability to alter queries. No more alterableQueries or db_rewrite_sql(). Instead, any query that needs to be altered instead utilizes a View, that can be altered to affect the query. Or, avoid altering entirely through... - Access control: Make access control queries explicitly defined when creating Views. Instead of automatically restricting listings, require listings to have access control explicitly defined (similar to explicitly defining the "published" state). - Database connections: We can still use PDO to connect to the database. It's just as fast as a mysqli connection in benchmarks, and makes it so we can use a consistent syntax for doing queries, regardless of the back end.
Things we would NOT remove or build out later include: - Schema API: As long as we support PostgreSQL (which we should for the initial release at least), Schema API is still needed to define and update tables. - Entity abstraction: We should focus on ensuring entities are loaded and modified through the entity API alone, making it so it's still possible to cache and store entities in a swappable mechanism. Although things like MongoDB are probably not the target audience, efficient per-entity caching definitely is, so this benefits us for the time being.
The initial effort should be to provide a database system that can update usage of db_query() throughout core with a lightweight replacement directly against PDO. We can work on removing db_select/update/insert/delete queries over time and then remove them (and DBTNG) when finished.
Recent comments
Hello, @yorkshirepudding! Thanks a lot, I got it, all sorted out.
My layout template (layout--blog.tpl.php) doesn't work
Hi @Gnome and welcome to Backdrop When I create custom layout templates I put them in /layouts/custom/my_layout Note: you can split modules and layouts between contrib and custom...
My layout template (layout--blog.tpl.php) doesn't work
This post explains how to do this in Drupal 7. In Backdrop, File Entity is already part of core. You will need to download and install module Views Field View. https://drupal.stackexchange...
I Need to Display an Image in a View that was Uploaded to a Webform