Open adamziel opened 5 months ago
Npm package implementing a MySQL server text protocol:
https://sidorares.github.io/node-mysql2/docs/documentation/mysql-server
The binary protocol isn't supported — is it required by PHP, or is the text protocol enough?
Another idea: this MySQL "fake server" written in Rust could perhaps be compiled to WASM and used to pipe the queries back to the SQLite plugin. Or, if that's difficult to instrument, maybe it could be ported to TypeScript or even PHP?
The SQLite database integration plugin is great when you use
$wpdb
, but plugin authors callmysqli_connect
andnew PDO()
all the time.Playground could intercept the outgoing network traffic and pretend to have a running MySQL server just like the stream wrappers support pretends to be an HTTPS server. It would implement the MySQL connection protocol and run all the transmitted queries against SQLite.