Module: Journaled::Connection
Defined Under Namespace
Modules: TestOnlyBehaviors
Class Method Summary
collapse
#transaction_open?
Class Method Details
.available? ⇒ Boolean
6
7
8
|
# File 'lib/journaled/connection.rb', line 6
def available?
Journaled.transactional_batching_enabled? && transaction_open?
end
|
.stage!(event) ⇒ Object
10
11
12
13
14
15
16
|
# File 'lib/journaled/connection.rb', line 10
def stage!(event)
raise TransactionSafetyError, " Transaction not available! By default, journaled event batching requires an open database transaction.\n MSG\n\n connection.current_transaction._journaled_staged_events << event\nend\n" unless available?
|