I wanted something like Python's executescript so I looked into porting it.
It turns out that SQLite already has a convenience method for this, sqlite3_exec.
If this had been in the interface, I would have saved quite a bit of time debugging. So I hope this will be merged eventually!
Things left to do
Rebuild the WASM
Document the method better
Add test?
Wrap in TRANSACTION?
Python's implementation looks like this. I think it's complicated because of threading. It also runs COMMIT first, but I don't think this library has an auto-commit feature.
I didn't commit the WASM myself because my computer didn't make an identical build on master and I didn't want to do it wrong.
Hello!
I wanted something like Python's
executescript
so I looked into porting it.It turns out that SQLite already has a convenience method for this,
sqlite3_exec
.If this had been in the interface, I would have saved quite a bit of time debugging. So I hope this will be merged eventually!
Things left to do
TRANSACTION
?Python's implementation looks like this. I think it's complicated because of threading. It also runs
COMMIT
first, but I don't think this library has an auto-commit feature.I didn't commit the WASM myself because my computer didn't make an identical build on
master
and I didn't want to do it wrong.