| Module | Sequel::JDBC::Transactions |
| In: |
lib/sequel/adapters/jdbc/transactions.rb
|
| 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 |
# File lib/sequel/adapters/jdbc/transactions.rb, line 6 6: def freeze 7: supports_savepoints? 8: super 9: end
Check the JDBC DatabaseMetaData for savepoint support
# File lib/sequel/adapters/jdbc/transactions.rb, line 12
12: def supports_savepoints?
13: return @supports_savepoints if defined?(@supports_savepoints)
14: @supports_savepoints = synchronize{|c| c.getMetaData.supports_savepoints}
15: end
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, line 19
19: def supports_transaction_isolation_levels?
20: synchronize{|conn| conn.getMetaData.supportsTransactionIsolationLevel(JavaSQL::Connection::TRANSACTION_SERIALIZABLE)}
21: end