← All changes
|
wp-includes/database/sqlite/class-wp-sqlite-configurator.php
+8
-6
2.2.21
→
trunk
View file →
| @@ -8,14 +8,16 @@ | ||
| 8 | 8 | * |
| 9 | 9 | * The configurator ensures that tables required for emulating MySQL behaviors |
| 10 | 10 | * are created and populated with necessary data. It is also able to partially |
| 11 | 11 | * repair and update these tables and metadata in case of database corruption. |
| 12 | + * | |
| 13 | + * @access private | |
| 12 | 14 | */ |
| 13 | 15 | class WP_SQLite_Configurator { |
| 14 | 16 | /** |
| 15 | 17 | * The SQLite driver instance. |
| 16 | 18 | * |
| 17 | - * @var WP_PDO_MySQL_On_SQLite | |
| 19 | + * @var WP_MySQL_On_SQLite | |
| 18 | 20 | */ |
| 19 | 21 | private $driver; |
| 20 | 22 | |
| 21 | 23 | /** |
| @@ -34,13 +36,13 @@ | ||
| 34 | 36 | |
| 35 | 37 | /** |
| 36 | 38 | * Constructor. |
| 37 | 39 | * |
| 38 | - * @param WP_PDO_MySQL_On_SQLite $driver The SQLite driver instance. | |
| 40 | + * @param WP_MySQL_On_SQLite $driver The SQLite driver instance. | |
| 39 | 41 | * @param WP_SQLite_Information_Schema_Builder $schema_builder The information schema builder instance. |
| 40 | 42 | */ |
| 41 | 43 | public function __construct( |
| 42 | - WP_PDO_MySQL_On_SQLite $driver, | |
| 44 | + WP_MySQL_On_SQLite $driver, | |
| 43 | 45 | WP_SQLite_Information_Schema_Builder $schema_builder |
| 44 | 46 | ) { |
| 45 | 47 | $this->driver = $driver; |
| 46 | 48 | $this->schema_builder = $schema_builder; |
| @@ -99,9 +101,9 @@ | ||
| 99 | 101 | $this->driver->execute_sqlite_query( |
| 100 | 102 | sprintf( |
| 101 | 103 | 'CREATE TABLE IF NOT EXISTS %s (name TEXT PRIMARY KEY, value TEXT)', |
| 102 | 104 | $this->driver->get_connection()->quote_identifier( |
| 103 | - WP_PDO_MySQL_On_SQLite::GLOBAL_VARIABLES_TABLE_NAME | |
| 105 | + WP_MySQL_On_SQLite::GLOBAL_VARIABLES_TABLE_NAME | |
| 104 | 106 | ) |
| 105 | 107 | ) |
| 106 | 108 | ); |
| 107 | 109 | } |
| @@ -259,13 +261,13 @@ | ||
| 259 | 261 | $this->driver->execute_sqlite_query( |
| 260 | 262 | sprintf( |
| 261 | 263 | 'INSERT INTO %s (name, value) VALUES (?, ?) ON CONFLICT(name) DO UPDATE SET value = ?', |
| 262 | 264 | $this->driver->get_connection()->quote_identifier( |
| 263 | - WP_PDO_MySQL_On_SQLite::GLOBAL_VARIABLES_TABLE_NAME | |
| 265 | + WP_MySQL_On_SQLite::GLOBAL_VARIABLES_TABLE_NAME | |
| 264 | 266 | ) |
| 265 | 267 | ), |
| 266 | 268 | array( |
| 267 | - WP_PDO_MySQL_On_SQLite::DRIVER_VERSION_VARIABLE_NAME, | |
| 269 | + WP_MySQL_On_SQLite::DRIVER_VERSION_VARIABLE_NAME, | |
| 268 | 270 | SQLITE_DRIVER_VERSION, |
| 269 | 271 | SQLITE_DRIVER_VERSION, |
| 270 | 272 | ) |
| 271 | 273 | ); |