Simplify the MySQL-on-SQLite driver API#449
Draft
JanJakes wants to merge 2 commits into
Draft
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WP_SQLite_Drivercompatibility wrapper.WP_PDO_MySQL_On_SQLitetoWP_MySQL_On_SQLiteand align implementation, test, tooling, and CI references.PDOStatementquery 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_Drivermust constructWP_MySQL_On_SQLitewith its DSN and options, and consumequery()results asPDOStatementobjects. Consumers usingWP_PDO_MySQL_On_SQLitemust update the class name toWP_MySQL_On_SQLite.The root
wp-pdo-mysql-on-sqlite.phpcompatibility loader remains available; only the loaded driver class is renamed.Testing
composer run check-cscd packages/mysql-on-sqlite && composer run test— 740 tests, 1,428,284 assertions; 15 skipped and 2 incompletecd packages/mysql-proxy && composer run test— 10 tests, 20 assertions; 1 skipped