Skip to content

MDL-88218: Add experimental SQLite support for Moodle WASM environments (5.2)#5

Open
erseco wants to merge 3 commits into
MOODLE_502_STABLEfrom
MDL-88218-sqlite-502
Open

MDL-88218: Add experimental SQLite support for Moodle WASM environments (5.2)#5
erseco wants to merge 3 commits into
MOODLE_502_STABLEfrom
MDL-88218-sqlite-502

Conversation

@erseco

@erseco erseco commented Jul 8, 2026

Copy link
Copy Markdown
Member

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.x
image builds reused the main-based patch (#1); this gives 5.2 its own patch
against MOODLE_502_STABLE, so the diff is stable as main moves on to 5.3.

Changes

  • Add the SQLite PDO driver and DDL generator (public/lib/dml/sqlite3_pdo_moodle_database.php,
    public/lib/ddl/sqlite_sql_generator.php).
  • Declare the sqlite database <VENDOR> in the <MOODLE version="5.2"> block
    of public/admin/environment.xml.
  • Wire SQLite into the installer (install.php, installlib.php, install lang
    strings) and the shared PDO base.

Experimental; intended for WASM / demo / testing environments only.

Verification

Applies cleanly onto MOODLE_502_STABLE (no fuzz/rejects); php -l clean on all
changed files; the sqlite VENDOR lands in the 5.2 block. Consumed by
erseco/alpine-moodle for v5.2*
builds, where a full SQLite install + moosh smoke test passes.

erseco added 3 commits July 8, 2026 06:58
…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).
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