Skip to content

Migrate to official WordPress SQLite plugin that uses SQL parser#152

Merged
adamziel merged 2 commits into
trunkfrom
add-sqlite-database-integration
Mar 17, 2023
Merged

Migrate to official WordPress SQLite plugin that uses SQL parser#152
adamziel merged 2 commits into
trunkfrom
add-sqlite-database-integration

Conversation

@adamziel

Copy link
Copy Markdown
Collaborator

Description

Migrates Playground from regexp-based wp-sqlite-db to the official sqlite-database-integration plugin which translates queries using SQL parser instead of regular expressions.

This makes for a more reliable SQLite integration that passes almost all WordPress unit tests.

Learn more about the problem with regular expressions.

| sed 's#{SQLITE_IMPLEMENTATION_FOLDER_PATH}#'`pwd`'/wordpress/wp-content/plugins/sqlite-database-integration#g' \
| sed 's#{SQLITE_PLUGIN}#sqlite-database-integration#g' \
> wordpress/wp-content/db.php && \
| sed "s#{SQLITE_IMPLEMENTATION_FOLDER_PATH}#' . __DIR__ . '/plugins/sqlite-database-integration#g" \

@adamziel adamziel Mar 17, 2023

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an intentional PHP injection. I'm not proud. Eventually let's find a better approach to setting up this plugin programaticaly. cc @aristath

@adamziel adamziel changed the title Add sqlite database integration Migrate to official WordPress SQLite plugin that uses SQL parser Mar 17, 2023
@adamziel adamziel merged commit 813067d into trunk Mar 17, 2023
@adamziel adamziel deleted the add-sqlite-database-integration branch March 17, 2023 00:24
@adamziel adamziel added the Build label Mar 17, 2023
@adamziel adamziel mentioned this pull request Apr 27, 2023
56 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant