Open akadusei opened 6 days ago
I think this makes sense. One thing that may need to change is this section
Since these make calls out, I don't think we have direct control over the SQL. Whomever takes this on could try doing something like
db.transaction do
# ... code
end
but if that doesn't work, then just a refactor to bring the proper SQL in here for it would be fine.
https://github.com/luckyframework/avram/blob/bec90582181bed458e1c36d0497b8fce3353306f/src/avram/delete_operation.cr#L38
I'm wondering if
Avram::DeleteOperation#delete
should use a transaction, like itsSaveOperation#save
counterpart. This should enable anafter_commit
callback counterpart for delete operations.