tursodatabase/libsql-client-ts

Interactive transactions requires verbose API

Aperta

#254 aperta il 28 ago 2024

 (1 commento) (0 reazioni) (0 assegnatari)TypeScript (67 fork)auto 404
developer experienceenhancementgood first issuehelp wanted

Metriche repository

Star
 (566 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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"]);

Guida contributor