Module: Sequel::JDBC::Transactions
- Included in:
- AS400::DatabaseMethods, Cubrid::DatabaseMethods, DB2::DatabaseMethods, Derby::DatabaseMethods, Firebird::DatabaseMethods, HSQLDB::DatabaseMethods, Oracle::DatabaseMethods, Progress::DatabaseMethods, SqlAnywhere::DatabaseMethods
- Defined in:
- lib/sequel/adapters/jdbc/transactions.rb
Constant Summary collapse
- 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
Instance Method Summary collapse
-
#supports_savepoints? ⇒ Boolean
Check the JDBC DatabaseMetaData for savepoint support.
-
#supports_transaction_isolation_levels? ⇒ Boolean
Check the JDBC DatabaseMetaData for support for serializable isolation, since that’s the value most people will use.
Instance Method Details
#supports_savepoints? ⇒ Boolean
Check the JDBC DatabaseMetaData for savepoint support
14 15 16 17 |
# File 'lib/sequel/adapters/jdbc/transactions.rb', line 14 def supports_savepoints? return @supports_savepoints if defined?(@supports_savepoints) @supports_savepoints = synchronize{|c| c.getMetaData.supports_savepoints} end |
#supports_transaction_isolation_levels? ⇒ Boolean
Check the JDBC DatabaseMetaData for support for serializable isolation, since that’s the value most people will use.
21 22 23 |
# File 'lib/sequel/adapters/jdbc/transactions.rb', line 21 def supports_transaction_isolation_levels? synchronize{|conn| conn.getMetaData.supportsTransactionIsolationLevel(JavaSQL::Connection::TRANSACTION_SERIALIZABLE)} end |