Tomek20225
Tomek20225
DTDrizzle Team
Created by Tomek20225 on 11/2/2023 in #help
Has anyone implemented transactions with Cloudflare D1 and Drizzle?
Hi guys! As stated in the title, I’m trying to use Drizzle and D1 to build my app, and it requires transactions. I’m also using tRPC. I was surprised when I saw that my queries didn’t work in prod because of transactions. After reading Cloudflare’s blog, I learned that you need to create a procedure and use it within your API. Has anyone successfuly done that in a scenario close to mine? Or found any other solution? I want to avoid manually handling data deletion in case of errors. Maybe Drizzle ORM could read whether we’re using D1 and handle transactions in Cloudfare’s way under the hood? I’ll appreaciate any help!
13 replies