Change record status: 
Project: 
Introduced in branch: 
10.0.x
Introduced in version: 
10.0.0
Description: 

The new interface Drupal\Core\Database\SupportsTemporaryTablesInterface has been added. The new interface has only one method named queryTemporary(). All three by Core supported databases (MySQL, MariaDB, PostgreSQL and SQLite) have the interface added to their implementation of Drupal\Core\Database\Connection. Contrib database drivers are encouraged to do the same.

Example:

$temporary_table_name = \Drupal::database()->queryTemporary('SELECT [name] FROM {test}', []);
Impacts: 
Module developers