Class: DB::Context::Transaction
- Inherits:
-
Query
- Object
- Query
- DB::Context::Transaction
show all
- Defined in:
- lib/db/context/transaction.rb
Instance Attribute Summary
Attributes inherited from Query
#connection
Instance Method Summary
collapse
Methods inherited from Query
#call, #close, #flush, #initialize, #next_result, #results, #send_query
Instance Method Details
#abort ⇒ Object
34
35
36
37
|
# File 'lib/db/context/transaction.rb', line 34
def abort
self.call("ROLLBACK")
self.close
end
|
#commit ⇒ Object
29
30
31
32
|
# File 'lib/db/context/transaction.rb', line 29
def commit
self.call("COMMIT")
self.close
end
|
#rollback(name) ⇒ Object
43
44
45
|
# File 'lib/db/context/transaction.rb', line 43
def rollback(name)
self.call("ROLLBACK #{name}")
end
|
#savepoint(name) ⇒ Object
39
40
41
|
# File 'lib/db/context/transaction.rb', line 39
def savepoint(name)
self.call("SAVEPOINT #{name}")
end
|