NeonN
Neon16mo ago
6 replies
hurt-tomato

Transactions with Drizzle

I am a developer working with Drizzle, Neon, and Vercel in an edge deployment environment. I am experiment with Neon db in a personal project after using Vercel PG for a while. Considering that Vercel PG uses Neon, I expected that there would be little issue with swapping out the drivers. However, I was a bit confused when my transaction I ran with the http driver failed. I did a bit of researching and looking through this forum and it seems that the http driver does not support transactions. While I think it is clear enough with how to change from http to websocket, I have a few questions I would like answered:

1. Why is it that http transactions are not supported? I am nowhere near a networks expert so I am genuinely interested in what the challenges / reason are for why it has not been added when it is such a popular functionality of sql.
2. Is there a current roadmap to add support for http transactions?
3. When working in my environment described above, what do I lose in terms of performance and DX when I make the change from http to websocket?
4. Can use the http driver for everything non-transactional and the websocket only when needed?

Thanks for your time :)
Was this page helpful?