DBSourceDBContextTransaction

class Transaction

Definitions

def begin

Begin a transaction.

Implementation

def begin
	self.connect!
	self.call("BEGIN")
end

def commit

Commit the transaction and return the connection to the connection pool.

Implementation

def commit
	self.call("COMMIT")
	self.close
end

def abort

Abort the transaction and return the connection to the connection pool.

Implementation

def abort
	self.call("ROLLBACK")
	self.close
end

def savepoint(name)

Mark a savepoint in the transaction.

Implementation

def savepoint(name)
	self.call("SAVEPOINT #{name}")
end

def rollback(name)

Return back to a previously registered savepoint.

Implementation

def rollback(name)
	self.call("ROLLBACK #{name}")
end