11# MySQL on SQLite
22
3- A ** ` PDO\Mysql ` drop-in** for running MySQL-based PHP applications on SQLite.
3+ A ** ` PDO_MYSQL ` drop-in** for running MySQL-based PHP applications on SQLite.
44
55## Overview
66
77** MySQL on SQLite** is a pure-PHP database driver that exposes SQLite through
8- a ` PDO\Mysql ` -compatible API.
8+ a ` PDO_MYSQL ` -compatible API.
99
1010At a glance:
1111
1212- ** MySQL compatibility:** Broad coverage of MySQL syntax, semantics, types, and metadata.
13- - ** ` PDO\Mysql ` drop-in:** Extensive PDO API coverage with MySQL behavior emulation.
13+ - ** ` PDO_MYSQL ` drop-in:** Extensive PDO API coverage with MySQL behavior emulation.
1414- ** Pure PHP:** No third-party runtime dependencies.
1515- ** Lean runtime:** Small footprint, low overhead, and efficient query processing.
1616- ** Extensive validation:** Comprehensive test suites covering real-world patterns.
@@ -25,23 +25,23 @@ $pdo = new WP_MySQL_On_SQLite(
2525 'mysql-on-sqlite:path=/path/to/database.sqlite;dbname=app'
2626);
2727
28- // Use the PDO API to talk to the database as with PDO\Mysql .
28+ // Use the PDO API to talk to the database as with PDO_MYSQL .
2929$statement = $pdo->query( 'SELECT * FROM users' );
3030$users = $statement->fetchAll( PDO::FETCH_ASSOC );
3131```
3232
33- Switching an existing ` PDO\Mysql ` application to MySQL on SQLite can be as
33+ Switching an existing ` PDO_MYSQL ` application to MySQL on SQLite can be as
3434simple as:
3535
3636``` diff
37- - $pdo = new PDO\Mysql ( 'mysql:host=localhost;dbname=app', $username, $password );
37+ - $pdo = new PDO( 'mysql:host=localhost;dbname=app', $username, $password );
3838+ $pdo = new WP_MySQL_On_SQLite( 'mysql-on-sqlite:path=database.sqlite;dbname=app' );
3939```
4040
4141## Configuration
4242
4343The driver is configured through the standard PDO API, closely mirroring
44- ` PDO\Mysql ` while providing additional SQLite-specific options.
44+ ` PDO_MYSQL ` while providing additional SQLite-specific options.
4545
4646### DSN
4747
@@ -61,9 +61,9 @@ Use `;;` to include a literal semicolon in either value.
6161### PDO options
6262
6363The constructor follows the PDO signature and accepts most common attributes
64- supported by ` PDO\Mysql ` in its fourth argument. Its ` username ` and ` password `
64+ supported by ` PDO_MYSQL ` in its fourth argument. Its ` username ` and ` password `
6565arguments are accepted for compatibility and ignored. Driver-specific
66- ` PDO\Mysql ` attributes are currently not supported.
66+ ` PDO_MYSQL ` attributes are currently not supported.
6767
6868#### Driver options
6969
@@ -79,7 +79,7 @@ version and configuring the SQLite connection:
7979
8080## Compatibility
8181
82- The driver covers extensive MySQL functionality behind a ` PDO\Mysql ` -compatible
82+ The driver covers extensive MySQL functionality behind a ` PDO_MYSQL ` -compatible
8383API.
8484
8585### MySQL
@@ -108,7 +108,7 @@ Supported areas include:
108108
109109### PDO
110110
111- The driver broadly supports the PDO API and aims for full ` PDO\Mysql `
111+ The driver broadly supports the PDO API and aims for full ` PDO_MYSQL `
112112compatibility. Some APIs, such as prepared statements, parameter binding, and
113113multi-statement queries, are not yet supported.
114114
0 commit comments