libsql-js icon indicating copy to clipboard operation
libsql-js copied to clipboard

A better-sqlite3 compatible API for libSQL that supports Bun, Deno, and Node

Results 56 libsql-js issues
Sort by recently updated
recently updated
newest added

We are still a bit behind `better-sqlite3`. For example, there's more overhead in `get()`: ``` penberg@vonneumann libsql-js % node perf/perf-libsql.js cpu: Apple M1 runtime: node v18.19.0 (arm64-darwin) benchmark time (avg)...

enhancement
help wanted
good first issue

Following up on https://github.com/tursodatabase/libsql-js/pull/119, this PR proposes that we expose the newer `/types/promise.d.ts` file through the `package.json#exports` field, the same way the synchronous interface is exposed.

Applications may want to know how long their queries were running. Let's add query monitoring support to the library.

enhancement
help wanted
good first issue

If a query takes a long time, applications may want to cancel them either manually or via a timeout mechanism. We should be able to use the `sqlite3_progress_handler()` to implement...

enhancement
help wanted
good first issue

Make opening description more clear

Support for named in-memory database: `file:memdb1?mode=memory&cache=shared` You can find more information here: https://www.sqlite.org/inmemorydb.html The use case is more for testing multi-tenant apps, where you have a `main` database and you...

Currently, better-sqlite3 allows stopping an active iterator by calling [return()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#returnvalue). This ensures clean-up and halts further reads. Here's an example: ```js const stmt = db.prepare("SELECT * FROM organizations"); // This...

resolves #185 This PR changes the `require` from dynamic variables to static strings to avoid bundle issues. It shouldn't affect runtime behavior, so it should be safe to merge ❤️

## Problem Using runtime dynamic variables in `require()` calls prevents analysis tools (especially [@vercel/nft](https://github.com/vercel/nft)) from correctly analyzing dependencies, leading to missing files in the build output and runtime errors. (From...