Sha256: ee776b3f6fb901e5e4bc6610eaefed2b27453b667ef86d8bdf2c7b5e6fae0237

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

require 'active_record'
require 'expeditor'
require 'activerecord/shard_for/version'
require 'activerecord/shard_for/config'
require 'activerecord/shard_for/cluster_config'
require 'activerecord/shard_for/model'
require 'activerecord/shard_for/errors'
require 'activerecord/shard_for/cluster_router'
require 'activerecord/shard_for/hash_modulo_router'
require 'activerecord/shard_for/database_tasks'
require 'activerecord/shard_for/shard_repogitory'
require 'activerecord/shard_for/all_shards_in_parallel'
require 'activerecord/shard_for/replication_mapping'
require 'activerecord/railtie' if defined?(Rails5)

module ActiveRecord
  module ShardFor
    class << self
      # @return [Activerecord::ShardFor::Config]
      def config
        @config ||= Config.new
      end

      # @yield [Activerecord::ShardFor::Config]
      def configure(&block)
        config.instance_eval(&block)
      end
    end
  end
end

ActiveRecord::ShardFor.config.register_connection_router(:hash_modulo, ActiveRecord::ShardFor::HashModuloRouter)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activerecord-shard_for-0.1.1 lib/activerecord/shard_for.rb