Keywords
9 months ago
MySQL
2 years ago
AbstractMySQLPlatform.php
9 months ago
AbstractPlatform.php
9 months ago
DateIntervalUnit.php
2 years ago
MariaDBPlatform.php
2 years ago
MariaDb1010Platform.php
9 months ago
MariaDb1027Platform.php
2 years ago
MariaDb1043Platform.php
2 years ago
MariaDb1052Platform.php
2 years ago
MariaDb1060Platform.php
2 years ago
MariaDb110700Platform.php
9 months ago
MySQL57Platform.php
2 years ago
MySQL80Platform.php
2 years ago
MySQL84Platform.php
9 months ago
MySQLPlatform.php
2 years ago
PostgreSQL120Platform.php
9 months ago
TrimMode.php
2 years ago
index.php
2 years ago
MariaDb1010Platform.php
37 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Doctrine\DBAL\Platforms; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use MailPoetVendor\Doctrine\DBAL\SQL\Builder\SelectSQLBuilder; |
| 5 | use function implode; |
| 6 | class MariaDb1010Platform extends MariaDb1060Platform |
| 7 | { |
| 8 | public function createSelectSQLBuilder() : SelectSQLBuilder |
| 9 | { |
| 10 | return AbstractPlatform::createSelectSQLBuilder(); |
| 11 | } |
| 12 | public function fetchTableOptionsByTable(bool $includeTableName) : string |
| 13 | { |
| 14 | // MariaDB-10.10.1 added FULL_COLLATION_NAME to the information_schema.COLLATION_CHARACTER_SET_APPLICABILITY. |
| 15 | // A base collation like uca1400_ai_ci can refer to multiple character sets. The value in the |
| 16 | // information_schema.TABLES.TABLE_COLLATION corresponds to the full collation name. |
| 17 | $sql = <<<'SQL' |
| 18 | SELECT t.TABLE_NAME, |
| 19 | t.ENGINE, |
| 20 | t.AUTO_INCREMENT, |
| 21 | t.TABLE_COMMENT, |
| 22 | t.CREATE_OPTIONS, |
| 23 | t.TABLE_COLLATION, |
| 24 | ccsa.CHARACTER_SET_NAME |
| 25 | FROM information_schema.TABLES t |
| 26 | INNER JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY ccsa |
| 27 | ON ccsa.FULL_COLLATION_NAME = t.TABLE_COLLATION |
| 28 | SQL; |
| 29 | $conditions = ['t.TABLE_SCHEMA = ?']; |
| 30 | if ($includeTableName) { |
| 31 | $conditions[] = 't.TABLE_NAME = ?'; |
| 32 | } |
| 33 | $conditions[] = "t.TABLE_TYPE = 'BASE TABLE'"; |
| 34 | return $sql . ' WHERE ' . implode(' AND ', $conditions); |
| 35 | } |
| 36 | } |
| 37 |