sqlite3
sqlite3 copied to clipboard
Rewrite for better performance & API
Goals:
- Optimize for fastapi calls
- Take inspiration from
better-sqlite3(Node.js) API as it is simple and concise
Previously:

Now:

Bun is caching column names / count and does no validation if you alter schema from another process. It has an unfair advantage here, let's not choose the bad actor as the baseline.
One thing I noticed about the Bun and the better-sqlite3 implementations is that they don't make you call sqlite3_finalize for prepared statements. That's because they use destructors in the C++ implementations [0] [1].
I know we don't have destructors in JS, but I'm wondering if you would consider using something like the FinalizationRegistry API to do this?
I know we don't have destructors in JS, but I'm wondering if you would consider using something like the FinalizationRegistry API to do this?
Yup - good idea, added it now
Had to revert finalizer... causing unexpected exits during tests weirdly only on Windows CI
Managed to fix finalizer