module Sequel::JDBC::Transactions

  1. lib/sequel/adapters/jdbc/transactions.rb
Parent: JDBC

Constants

JDBC_TRANSACTION_ISOLATION_LEVELS = {:uncommitted=>JavaSQL::Connection::TRANSACTION_READ_UNCOMMITTED, :committed=>JavaSQL::Connection::TRANSACTION_READ_COMMITTED, :repeatable=>JavaSQL::Connection::TRANSACTION_REPEATABLE_READ, :serializable=>JavaSQL::Connection::TRANSACTION_SERIALIZABLE}  
TRANSACTION_BEGIN = 'Transaction.begin'.freeze  
TRANSACTION_COMMIT = 'Transaction.commit'.freeze  
TRANSACTION_RELEASE_SP = 'Transaction.release_savepoint'.freeze  
TRANSACTION_ROLLBACK = 'Transaction.rollback'.freeze  
TRANSACTION_ROLLBACK_SP = 'Transaction.rollback_savepoint'.freeze  
TRANSACTION_SAVEPOINT = 'Transaction.savepoint'.freeze  

Public Instance methods

supports_savepoints? ()

Check the JDBC DatabaseMetaData for savepoint support

[show source]
# File lib/sequel/adapters/jdbc/transactions.rb, line 12
def supports_savepoints?
  return @supports_savepoints if defined?(@supports_savepoints)
  @supports_savepoints = synchronize{|c| c.getMetaData.supports_savepoints}
end
supports_transaction_isolation_levels? ()

Check the JDBC DatabaseMetaData for support for serializable isolation, since that’s the value most people will use.

[show source]
# File lib/sequel/adapters/jdbc/transactions.rb, line 19
def supports_transaction_isolation_levels?
  synchronize{|conn| conn.getMetaData.supportsTransactionIsolationLevel(JavaSQL::Connection::TRANSACTION_SERIALIZABLE)}
end