Sha256: 5819b9f426efca0b3650efa035d6f933d31d9247a38559c7a63145216d06b996

Contents?: true

Size: 1.49 KB

Versions: 2

Compression:

Stored size: 1.49 KB

Contents

# frozen_string_literal: true

# VERSION
require_relative 'elasticsearch_record/version'

require 'active_record'

# new arel
require 'arel/collectors/elasticsearch_query'
require 'arel/nodes/select_agg'
require 'arel/nodes/select_configure'
require 'arel/nodes/select_kind'
require 'arel/nodes/select_query'
require 'arel/visitors/elasticsearch'

# new adapter
require 'active_record/connection_adapters/elasticsearch_adapter'

module ElasticsearchRecord
  extend ActiveSupport::Autoload

  eager_autoload do
    autoload :Base
    autoload :Core
    autoload :ModelSchema
    autoload :Persistence
    autoload :Querying
    autoload :Query
    autoload :Result
    autoload :StatementCache
  end

  module Extensions
    extend ActiveSupport::Autoload

    autoload :Relation
  end

  module Relation
    extend ActiveSupport::Autoload

    autoload :CalculationMethods
    autoload :CoreMethods
    autoload :QueryClause
    autoload :QueryClauseTree
    autoload :QueryMethods
    autoload :ResultMethods
    autoload :ValueMethods
  end
end

ActiveSupport.on_load(:active_record) do
  # load patches
  require 'elasticsearch_record/patches/active_record/relation_merger_patch'
  require 'elasticsearch_record/patches/arel/select_core_patch'
  require 'elasticsearch_record/patches/arel/select_manager_patch'
  require 'elasticsearch_record/patches/arel/select_statement_patch'
  require 'elasticsearch_record/patches/arel/update_manager_patch'
  require 'elasticsearch_record/patches/arel/update_statement_patch'
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
elasticsearch_record-1.0.1 lib/elasticsearch_record.rb
elasticsearch_record-1.0.0 lib/elasticsearch_record.rb