Module: ActiveRecord::ConnectionAdapters::Elasticsearch::Transactions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/active_record/connection_adapters/elasticsearch/transactions.rb
Instance Method Summary collapse
-
#begin_db_transaction ⇒ Object
Begins the transaction (and turns off auto-committing).
-
#commit_db_transaction ⇒ Object
Commits the transaction (and turns on auto-committing).
- #create_savepoint ⇒ Object
-
#exec_rollback_db_transaction ⇒ Object
rollback transaction.
- #exec_rollback_to_savepoint ⇒ Object
- #release_savepoint ⇒ Object
- #transaction ⇒ Object
Instance Method Details
#begin_db_transaction ⇒ Object
Begins the transaction (and turns off auto-committing).
19 20 21 |
# File 'lib/active_record/connection_adapters/elasticsearch/transactions.rb', line 19 def begin_db_transaction(*) _throw_transaction_exception!(:begin_db_transaction) end |
#commit_db_transaction ⇒ Object
Commits the transaction (and turns on auto-committing).
24 25 26 |
# File 'lib/active_record/connection_adapters/elasticsearch/transactions.rb', line 24 def commit_db_transaction(*) _throw_transaction_exception!(:commit_db_transaction) end |
#create_savepoint ⇒ Object
33 34 35 |
# File 'lib/active_record/connection_adapters/elasticsearch/transactions.rb', line 33 def create_savepoint(*) _throw_transaction_exception!(:create_savepoint) end |
#exec_rollback_db_transaction ⇒ Object
rollback transaction
29 30 31 |
# File 'lib/active_record/connection_adapters/elasticsearch/transactions.rb', line 29 def exec_rollback_db_transaction(*) _throw_transaction_exception!(:exec_rollback_db_transaction) end |
#exec_rollback_to_savepoint ⇒ Object
37 38 39 |
# File 'lib/active_record/connection_adapters/elasticsearch/transactions.rb', line 37 def exec_rollback_to_savepoint(*) _throw_transaction_exception!(:exec_rollback_to_savepoint) end |
#release_savepoint ⇒ Object
41 42 43 |
# File 'lib/active_record/connection_adapters/elasticsearch/transactions.rb', line 41 def release_savepoint(*) _throw_transaction_exception!(:release_savepoint) end |
#transaction ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/active_record/connection_adapters/elasticsearch/transactions.rb', line 9 def transaction(*) # since ActiveRecord does not have any configuration option to support transactions, # this will be always false # return super if supports_transactions? # # So, transactions are silently swallowed... yield end |