|
|
|
|
|
by puika
1248 days ago
|
|
I defaulted to Prisma for edge apps I'm experimenting with (supabase db). Given it's not possible to connect via TCP to a database and I'm stuck with JS/TS for the edge, I opted for Prisma's data proxy and henceforth Prisma. Using the ORM means I'm tied to this mess of an abstraction, migrations and scripts that require so many workarounds and experimentation to make it worthwhile when your app is not a simple CRUD or you want performance optimizations without ending up writing your own queries yet again. The generated TS API is the only pleasant feature, but doing things the Prisma way I noticed my app is now tied to this ecosystem and its quirks and I dread it. Being unable to check generated queries' SQL beforehand is also a huge issue that is not getting solved any time soon from what I've gathered on their github. You could also use Prisma as a SQL client and leverage their data proxy, without needing to use the ORM and execute SQL migrations and queries directly, which is what I intend to do from now on. Please do let me know if there are any other generic alternatives database-wise (for "the edge"), I miss raw [Postgre]SQL. Supabase's client is the closest I can think of and it also generates types from your db, but it's obviously not a generic solution. Lastly, one particular thing that disgusts me (I believe it's not on Prisma but due to how the edge works) is that you cannot use a local database for development. Perhaps ngrok will work, but then you'd need to constantly update your data proxy project settings manually - I need to experiment more on that. |
|