tursodatabase / libsql-client-ts

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

Interleaved transactions no longer work #104

Open penberg opened 1 year ago

penberg commented 1 year ago

Pull request #100 optimized the API to share the same connection, but this now breaks interleaved transactions:

  const tx1 = await libsql.transaction('deferred')
  await tx1.execute(`SELECT 1`)

  const tx2 = await libsql.transaction('deferred')
  await tx2.execute(`SELECT 1`)

  await tx1.commit()
  await tx2.commit()