Sha256: 6079d71282adc30c3887cebc10f3c82b64873735dc6cedfeeb56fb5b0dd65c80

Contents?: true

Size: 836 Bytes

Versions: 2

Compression:

Stored size: 836 Bytes

Contents

module ActiveRecord
  module ConnectionAdapters
    module CockroachDB
      module DatabaseStatements
        # Since CockroachDB will run all transactions with serializable isolation,
        # READ UNCOMMITTED, READ COMMITTED, and REPEATABLE READ are all aliases
        # for SERIALIZABLE. This lets the adapter support all isolation levels,
        # but READ UNCOMMITTED has been removed from this list because the
        # ActiveRecord transaction isolation test fails for READ UNCOMMITTED.
        # See https://www.cockroachlabs.com/docs/v19.2/transactions.html#isolation-levels
        def transaction_isolation_levels
          {
            read_committed:   "READ COMMITTED",
            repeatable_read:  "REPEATABLE READ",
            serializable:     "SERIALIZABLE"
          }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activerecord-cockroachdb-adapter-5.2.0.beta2 lib/active_record/connection_adapters/cockroachdb/database_statements.rb
activerecord-cockroachdb-adapter-0.3.0.beta1 lib/active_record/connection_adapters/cockroachdb/database_statements.rb