tursodatabase / tursodatabase/libsql-client-ts
read mode allows inserts & more
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 576
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
Quick demo:
import { createClient } from "@libsql/client";
const client = createClient({
url: ":memory:",
});
console.log(
await client.batch(
["CREATE TABLE x(y)", "INSERT INTO x(y) VALUES (1)", "SELECT * from x"],
"read",
),
);
This probably shouldn't be possible. It seems that this is also possible with a non-memory database. I can't really see whether read mode makes any difference to queries at all.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the client.batch call shown in the issue and trace how the "read" mode is handled for the listed CREATE, INSERT, and SELECT statements. Reproduce the example with an in-memory database and a non-memory database; done means read mode's write behavior is defined and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sqlite, typescript
- Domain
- api, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100