libsql-client-ts icon indicating copy to clipboard operation
libsql-client-ts copied to clipboard

Interactive transactions requires verbose API

Open penberg opened this issue 1 year ago • 1 comments

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 avatar Aug 28 '24 10:08 penberg

CC @notrab @giovannibenussi

penberg avatar Aug 28 '24 10:08 penberg