|
|
|
|
|
by meotimdihia
1098 days ago
|
|
I am using Prisma in the production. I want to ask: - Can EdgeDB solve the problems like `soft-delete`? Prisma can't do this good, there are third-party packages, but I don't trust these packages because authors often drop support. - How about hooks, for example, I want to trigger scripts after/before a record is added to the table. |
|
Yes, with access policy rules. E.g
The above will effectively "hide" objects with `.deleted` set to `true` from all queries when the `hide_deleted` global is set to true.> How about hooks, for example, I want to trigger scripts after/before a record is added to the table.
EdgeDB supports triggers: https://www.edgedb.com/docs/changelog/3_x#triggers. Future versions will add support for causing effects outside of the database, e.g. call a WebHook or some such.