tursodatabase / libsql-client-ts

TypeScript/JavaScript client API for libSQL
https://docs.turso.tech/sdk/ts/quickstart
MIT License
253 stars 37 forks source link

Interactive transactions requires verbose API #254

Open penberg opened 2 months ago

penberg commented 2 months ago

Interactive transactions require to use the verbose API:

await tx.execute({sql: "INSERT INTO users (id, name) VALUES (?, ?)", args: [3, "Charlie"]});
await tx.execute({sql: "INSERT INTO users (id, name) VALUES (?, ?)", args: [4, "Eve"]});

Let's add support for the simpler one:

await tx.execute("INSERT INTO users (id, name) VALUES (?, ?)", [3, "Charlie"]);
await tx.execute("INSERT INTO users (id, name) VALUES (?, ?)", [4, "Eve"]);
penberg commented 2 months ago

CC @notrab @giovannibenussi