module Sequel::Plugins::AssociationLazyEagerOption::InstanceMethods
Public 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 40 def _associated_dataset(opts, dynamic_opts) 41 ds = super 42 43 if eager = dynamic_opts[:eager] 44 ds = ds.eager(eager) 45 end 46 47 ds 48 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 51 def _associated_object_loader(opts, dynamic_opts) 52 return if dynamic_opts[:eager] 53 super 54 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 57 def load_with_primary_key_lookup?(opts, dynamic_opts) 58 return false if dynamic_opts[:eager] 59 super 60 end