Sha256: 938026db31e8e7cfc9816f23afdc96a3f6ee4fa2d090127fff54cefb541bcfa0

Contents?: true

Size: 492 Bytes

Versions: 14

Compression:

Stored size: 492 Bytes

Contents

module ActiveRecord::Turntable
  class SeqShard < Shard
    private

    def retrieve_connection_pool
      ActiveRecord::Base.turntable_connections[name] ||=
        begin
          config = ActiveRecord::Base.configurations[Rails.env]["seq"][name]
          raise ArgumentError, "Unknown database config: #{name}, have #{ActiveRecord::Base.configurations.inspect}" unless config
          ActiveRecord::ConnectionAdapters::ConnectionPool.new(spec_for(config))
        end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
activerecord-turntable-2.1.1 lib/active_record/turntable/seq_shard.rb
activerecord-turntable-2.1.0 lib/active_record/turntable/seq_shard.rb
activerecord-turntable-2.1.0.rc2 lib/active_record/turntable/seq_shard.rb
activerecord-turntable-2.1.0.rc1 lib/active_record/turntable/seq_shard.rb
activerecord-turntable-2.1.0.beta2 lib/active_record/turntable/seq_shard.rb
activerecord-turntable-2.1.0.beta1 lib/active_record/turntable/seq_shard.rb
activerecord-turntable-2.0.6 lib/active_record/turntable/seq_shard.rb
activerecord-turntable-2.0.5 lib/active_record/turntable/seq_shard.rb
activerecord-turntable-2.0.4 lib/active_record/turntable/seq_shard.rb
activerecord-turntable-2.0.3 lib/active_record/turntable/seq_shard.rb
activerecord-turntable-2.0.2 lib/active_record/turntable/seq_shard.rb
activerecord-turntable-2.0.1 lib/active_record/turntable/seq_shard.rb
activerecord-turntable-2.0.0 lib/active_record/turntable/seq_shard.rb
activerecord-turntable-2.0.0.rc1 lib/active_record/turntable/seq_shard.rb