Class: Cadet::Transaction

Inherits:
Object
  • Object
show all
Defined in:
lib/cadet/transaction.rb

Direct Known Subclasses

BatchInserter::Transaction

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(session) ⇒ Transaction

Returns a new instance of Transaction.



5
6
7
8
# File 'lib/cadet/transaction.rb', line 5

def initialize(session)
  @session = session
  @underlying = @session.begin_tx
end

Instance Attribute Details

#underlyingObject

Returns the value of attribute underlying.



3
4
5
# File 'lib/cadet/transaction.rb', line 3

def underlying
  @underlying
end

Instance Method Details

#closeObject



13
14
15
# File 'lib/cadet/transaction.rb', line 13

def close
  @underlying.close
end

#successObject



10
11
12
# File 'lib/cadet/transaction.rb', line 10

def success
  @underlying.success
end