MDL-88218: Add experimental SQLite support for Moodle WASM environments (5.2)#5
Open
erseco wants to merge 3 commits into
Open
MDL-88218: Add experimental SQLite support for Moodle WASM environments (5.2)#5erseco wants to merge 3 commits into
erseco wants to merge 3 commits into
Conversation
…ts (5.2) Backport of the experimental SQLite PDO driver to the 5.2 stable branch, matching the main (#1), 5.1 (#2), 5.0 (#3) and 4.5 (#4) companions. Adds the sqlite3 PDO driver and DDL generator, declares the sqlite database VENDOR in the 5.2 environment.xml block, and wires SQLite into the installer. Experimental; intended for WASM / demo / testing environments only.
database_column_info::__construct() reads its fields via object property access, so the SQLite driver's fetch_columns() must pass an object like the pgsql and mysqli drivers do. Passing the raw array left every property (including ->name) null, which broke callers reading $column->name (e.g. theme_snap's events query produced 'SELECT e., e., ...' and a syntax error).
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
Backport of the experimental SQLite support to the 5.2 stable branch,
companion to #1 (main), #2 (5.1), #3 (5.0) and #4 (4.5). Until now the
v5.2.ximage builds reused the
main-based patch (#1); this gives 5.2 its own patchagainst
MOODLE_502_STABLE, so the diff is stable asmainmoves on to 5.3.Changes
public/lib/dml/sqlite3_pdo_moodle_database.php,public/lib/ddl/sqlite_sql_generator.php).sqlitedatabase<VENDOR>in the<MOODLE version="5.2">blockof
public/admin/environment.xml.install.php,installlib.php, install langstrings) and the shared PDO base.
Experimental; intended for WASM / demo / testing environments only.
Verification
Applies cleanly onto
MOODLE_502_STABLE(no fuzz/rejects);php -lclean on allchanged files; the
sqliteVENDOR lands in the 5.2 block. Consumed byerseco/alpine-moodleforv5.2*builds, where a full SQLite install +
mooshsmoke test passes.