module Sequel::JDBC::Transactions

  1. lib/sequel/adapters/jdbc/transactions.rb

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}.freeze  

Public Instance methods

freeze()
[show source]
  # File lib/sequel/adapters/jdbc/transactions.rb
6 def freeze
7   supports_savepoints?
8   super
9 end
supports_savepoints?()

Check the JDBC DatabaseMetaData for savepoint support

[show source]
   # File lib/sequel/adapters/jdbc/transactions.rb
12 def supports_savepoints?
13   return @supports_savepoints if defined?(@supports_savepoints)
14   @supports_savepoints = synchronize{|c| c.getMetaData.supports_savepoints}
15 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
19 def supports_transaction_isolation_levels?
20   synchronize{|conn| conn.getMetaData.supportsTransactionIsolationLevel(JavaSQL::Connection::TRANSACTION_SERIALIZABLE)}
21 end