Sha256: db15be4e99091ce2cc654fb2b598abfb4f6e52544736e1cc8be15fcd788f11ff

Contents?: true

Size: 810 Bytes

Versions: 5

Compression:

Stored size: 810 Bytes

Contents

# frozen_string_literal: true

module ActiveGraphExtensions
  module Node
    module Query
      module QueryProxyEagerLoading
        # Used for eager loading associations with scope
        module AssociationEagerLoad
          extend ActiveSupport::Concern

          class_methods do
            def associations_to_eagerload
              @associations_to_eagerload
            end

            def association_nodes(key, ids, filter)
              send(@associations_to_eagerload[key], ids, filter)
            end

            def eagerload_associations(config)
              @associations_to_eagerload = config
            end

            def eagerload_association?(key)
              @associations_to_eagerload.keys.include?(key)
            end
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
activegraph-extensions-0.1.0 lib/active_graph_extensions/node/query/query_proxy_eager_loading/association_eager_load.rb
activegraph-extensions-0.0.4-java lib/active_graph_extensions/node/query/query_proxy_eager_loading/association_eager_load.rb
activegraph-extensions-0.0.3-java lib/active_graph_extensions/node/query/query_proxy_eager_loading/association_eager_load.rb
activegraph-extensions-0.0.2-java lib/active_graph_extensions/node/query/query_proxy_eager_loading/association_eager_load.rb
activegraph-extensions-0.0.1-java lib/active_graph_extensions/node/query/query_proxy_eager_loading/association_eager_load.rb