Skip to content

Simplify the MySQL-on-SQLite driver API#449

Draft
JanJakes wants to merge 2 commits into
trunkfrom
simplify-api
Draft

Simplify the MySQL-on-SQLite driver API#449
JanJakes wants to merge 2 commits into
trunkfrom
simplify-api

Conversation

@JanJakes

Copy link
Copy Markdown
Member

Summary

  • Remove the deprecated WP_SQLite_Driver compatibility wrapper.
  • Use the PDO-compatible driver directly in the WordPress integration and MySQL proxy.
  • Rename WP_PDO_MySQL_On_SQLite to WP_MySQL_On_SQLite and align implementation, test, tooling, and CI references.
  • Adapt legacy SQL behavior tests and production consumers to the PDOStatement query API.

Motivation

The temporary wrapper maintained a second constructor and result API around the PDO-compatible driver. Removing it leaves one implementation and one public entry point, reducing duplicated behavior and making the API easier to understand.

Developer impact

This is a breaking public API change. Consumers using WP_SQLite_Driver must construct WP_MySQL_On_SQLite with its DSN and options, and consume query() results as PDOStatement objects. Consumers using WP_PDO_MySQL_On_SQLite must update the class name to WP_MySQL_On_SQLite.

The root wp-pdo-mysql-on-sqlite.php compatibility loader remains available; only the loaded driver class is renamed.

Testing

  • composer run check-cs
  • cd packages/mysql-on-sqlite && composer run test — 740 tests, 1,428,284 assertions; 15 skipped and 2 incomplete
  • cd packages/mysql-proxy && composer run test — 10 tests, 20 assertions; 1 skipped

JanJakes added 2 commits July 10, 2026 13:44
Migrate the WordPress integration, MySQL proxy, tools, and tests to the PDO-style driver constructor and statement API.
Rename WP_PDO_MySQL_On_SQLite to WP_MySQL_On_SQLite and align the implementation and test filenames with the public class name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant