module Sequel::JDBC::Transactions

Constants

JDBC_TRANSACTION_ISOLATION_LEVELS

Public Instance Methods

freeze() click to toggle source
Calls superclass method
  # File lib/sequel/adapters/jdbc/transactions.rb
6 def freeze
7   supports_savepoints?
8   super
9 end
supports_savepoints?() click to toggle source

Check the JDBC DatabaseMetaData for savepoint support

   # 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?() click to toggle source

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

   # 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