Module: ActiveRecord::ConnectionAdapters::Elasticsearch::Transactions

Extended by:
ActiveSupport::Concern
Included in:
ActiveRecord::ConnectionAdapters::ElasticsearchAdapter
Defined in:
lib/active_record/connection_adapters/elasticsearch/transactions.rb

Instance Method Summary collapse

Instance Method Details

#begin_db_transactionObject

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_transactionObject

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_savepointObject



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_transactionObject

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_savepointObject



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_savepointObject



41
42
43
# File 'lib/active_record/connection_adapters/elasticsearch/transactions.rb', line 41

def release_savepoint(*)
  _throw_transaction_exception!(:release_savepoint)
end

#transactionObject



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