Is it possible to add "Using Drizzle on Cloudflare Workers" to website?
There are some issues when using Prisma together with D1, such as
- Batch processing for D1 is not supported, and there are no transactions at all https://www.prisma.io/docs/orm/overview/databases/cloudflare-d1#transactions-not-supported
- Complex queries are not supported, such as multi-table Join SQL syntax https://github.com/prisma/prisma/discussions/12715
- Single queries are very slow, usually over 200ms, which is quite strange. I believe this is related to the longer initialization time caused by Prisma internally using WASM https://github.com/prisma/prisma/discussions/23646#discussioncomment-9059560
I previously used Prisma + D1 because of the documentation, but later had to migrate to Drizzle, so maybe when using D1 it should recommend Drizzle instead of Prisma?
@rxliuli
Thank you for the issue. I think we should not recommend one specific library on our official website. But we can add a "Drizzle on Cloudflare" page on /examples/drizzle.
so there's a better auth example that uses drizzle + neon already
just in case anyone stumbles on this issue also looking for Drizzle + D1 guidance, the HONC docs (and corresponding templates) provide some guidance on how to use Drizzle + D1 locally and in prod. it's kind of a non-trivial setup!
Ah, there is no document for Drizzle on the examples page! I really want to have it.
so there's a better auth example that uses drizzle + neon already
just in case anyone stumbles on this issue also looking for Drizzle + D1 guidance, the HONC docs (and corresponding templates) provide some guidance on how to use Drizzle + D1 locally and in prod. it's kind of a non-trivial setup!
Thanks a lot I was just looking for that! You saved my day!