Replies: 1 comment
-
@brielov did you have any luck with this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need to create a generic function called
softDelete(id: string)
that can be used across multiple tables. The function should perform a transaction and, if the deletion fails, attempt to “soft-delete” the record. The function should take a generic table that must have two columns:id: string
anddeletedAt: Date
.Here’s an example of how the function could work:
Beta Was this translation helpful? Give feedback.
All reactions