module Sequel::Plugins::AssociationLazyEagerOption::InstanceMethods

Private Instance Methods

_associated_dataset(opts, dynamic_opts) click to toggle source

Return a dataset for the association after applying any dynamic callback.

Calls superclass method
   # File lib/sequel/plugins/association_lazy_eager_option.rb
42 def _associated_dataset(opts, dynamic_opts)
43   ds = super
44 
45   if eager = dynamic_opts[:eager]
46     ds = ds.eager(eager)
47   end
48 
49   ds
50 end
_associated_object_loader(opts, dynamic_opts) click to toggle source

A placeholder literalizer that can be used to load the association, or nil to not use one.

Calls superclass method
   # File lib/sequel/plugins/association_lazy_eager_option.rb
53 def _associated_object_loader(opts, dynamic_opts)
54   return if dynamic_opts[:eager]
55   super
56 end
load_with_primary_key_lookup?(opts, dynamic_opts) click to toggle source

Whether to use a simple primary key lookup on the associated class when loading.

Calls superclass method
   # File lib/sequel/plugins/association_lazy_eager_option.rb
59 def load_with_primary_key_lookup?(opts, dynamic_opts)
60   return false if dynamic_opts[:eager]
61   super
62 end