mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-28 04:14:34 +01:00
Probably this is larger than it should, but this PR: - Enhance error handling (instead of `unwraps`, napi's `GenericFailure` with custom message) - Add missing methods and properties for Database and Statements to turn explicit what should be done - Implement `all()` and `run()`* methods for `Statement` - Bump napi version to the latest stable - Implement `DatabaseStorage::sync()` for DatabaseFile - Add conversion from js values to limbo values \* `run()` isn't 100% compatible yet for two reasons: 1. The function API isn't variadic -- I chatted with napi's maintainer in Discord and he said that this isn't possible using only napi (in this version), and we could normalize "[...] parameters at the JavaScript layer before passing them to Rust". Something similar to [this](https:// github.com/rolldown/rolldown/blob/main/packages/rolldown/src/utils/bindi ngify-input-options.ts), which I plan to do in another PR. 2. better-sqlite version returns a result object, which isn't currently supported by core (AFAIK), I also plan to do this in another PR. Closes #1464