Module: Sequel::Database::RunTransactionHooks
- Defined in:
- lib/sequel/extensions/run_transaction_hooks.rb
Instance Method Summary collapse
-
#run_after_commit_hooks(opts = OPTS) ⇒ Object
Run all savepoint and transaction after_commit hooks for the current transaction, and remove the hooks after running them.
-
#run_after_rollback_hooks(opts = OPTS) ⇒ Object
Run all savepoint and transaction after_rollback hooks for the current transaction, and remove the hooks after running them.
Instance Method Details
#run_after_commit_hooks(opts = OPTS) ⇒ Object
Run all savepoint and transaction after_commit hooks for the current transaction, and remove the hooks after running them. Options:
- :server
-
The server/shard to use.
34 35 36 |
# File 'lib/sequel/extensions/run_transaction_hooks.rb', line 34 def run_after_commit_hooks(opts=OPTS) _run_transaction_hooks(:after_commit, opts) end |
#run_after_rollback_hooks(opts = OPTS) ⇒ Object
Run all savepoint and transaction after_rollback hooks for the current transaction, and remove the hooks after running them. Options:
- :server
-
The server/shard to use.
42 43 44 |
# File 'lib/sequel/extensions/run_transaction_hooks.rb', line 42 def run_after_rollback_hooks(opts=OPTS) _run_transaction_hooks(:after_rollback, opts) end |