await db.transaction(async (trx) => { await trx.execute(sql`LOCK TABLE myTable IN SHARE MODE;`);await trx.select.where name === katif name === kat throwawait trx.insert(myTable).set({name:'kat'})})
await db.transaction(async (trx) => { await trx.execute(sql`LOCK TABLE myTable IN SHARE MODE;`);await trx.select.where name === katif name === kat throwawait trx.insert(myTable).set({name:'kat'})})
using supabase and postgres spam the above function, sometimes kat gets created more than once however adding trx.execute(BEGIN TRANSACTION ) and then manually comitting it solves the problem, but drizzle logs gives an warning that a transaction is ongoing