Problem/Motivation
Connection::queryTemporary() is not used anywhere in Core, and has very limited usage in contrib (most are db driver implementations).
Implementing it in db drivers is not straightforward, either - for instance in SQLite it is necessary to tamper with the table prefix array, and we are trying to remove table-level prefixes in other issues. Oracle 11 does not have session-level temporary tables, so workarounds are needed.
Proposed resolution
Deprecate Connection::queryTemporary() for removal in Drupal10.
Remaining tasks
None
User interface changes
None
API changes
The method Drupal\Core\Database\Connection::queryTemporary() and the internal method Drupal\Core\Database\Connection::generateTemporaryTableName() are deprecated.
Data model changes
None
Release notes snippet
None
Issue fork drupal-3211780
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3211780-deprecate-connectionquerytemporary
changes, plain diff MR !616
Comments
Comment #3
mondrakeComment #5
daffie commentedThe issue #3106531: Notify in Status Report that per-table database prefixes are no longer supported, and will throw errors in Drupal 10.0 is blocked on this issue.
Comment #6
daffie commentedI agree with you @mondrake. Lets deprecate this functionality.
The method Drupal\Core\Database\Connection::generateTemporaryTableName() is a protected method, therefore it is considered as internal and not part of the public API. It does not have to be deprecated. Only it is used by contrib database drivers. Maybe better to do the deprecation and keep the change.
I have updated the CR and the IS.
It all looks good to me.
For me it is RTBC.
Comment #7
mondrakeThanks for CR and IS updates, @daffie
Comment #8
catchMakes sense to deprecate this in its own right, as well as unblocking per-table prefixes.
Committed 32f7a69 and pushed to 9.3.x. Thanks!
Comment #12
japerryFor those who may land on this issue -- It was reverted in Drupal 9.4.x and 10.0.x See https://www.drupal.org/project/drupal/issues/3312641