module Sequel::Plugins::SqlComments::DatasetMethods

Private Instance Methods

perform_eager_load(loader, eo) click to toggle source

Use SQL comments on eager load queries, showing they are eager loads.

Calls superclass method
    # File lib/sequel/plugins/sql_comments.rb
181 def perform_eager_load(loader, eo)
182   db.with_comments(:model=>model, :method_type=>:association_eager_load, :method=>nil, :association=>eo[:association]) do
183     super
184   end
185 end
prepare_eager_load(a, reflections, eager_assoc) click to toggle source

Add the association name as part of the eager load data, so perform_eager_load has access to it.

Calls superclass method
    # File lib/sequel/plugins/sql_comments.rb
170 def prepare_eager_load(a, reflections, eager_assoc)
171   res = super
172   
173   reflections.each do |r|
174     res[r[:eager_loader]][:association] = r[:name]
175   end
176 
177   res
178 end