Commit 97c3ebd
committed
Route lexer/parser through optional native classes
Add a small entrypoint in load.php that swaps in WP_MySQL_Native_Lexer /
WP_MySQL_Native_Parser when a native extension has pre-declared them, and
otherwise falls back to the pure-PHP implementations shipped in this package.
The PHP lexer and parser stay where they are with their original class
names. No file moves, no polyfill renames. Native extensions plug in by
declaring WP_MySQL_Native_* before this file is loaded.1 parent 2622441 commit 97c3ebd
3 files changed
Lines changed: 24 additions & 2 deletions
File tree
- packages/mysql-on-sqlite/src
- mysql/native
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
17 | 33 | | |
18 | 34 | | |
19 | 35 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments