Comment Comment by RedCrowbar > Can EdgeDB solve the problems like `soft-delete`?Yes, with access policy rules. E.g global hide_deleted: bool; type SoftDeletable { deleted: bool; access policy hide_deleted allow all when (global hide_deleted) using (not .deleted); } 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. parent RedCrowbar 3 years ago
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.