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
186 def perform_eager_load(loader, eo)
187   db.with_comments(:model=>model, :method_type=>:association_eager_load, :method=>nil, :association=>eo[:association]) do
188     super
189   end
190 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
175 def prepare_eager_load(a, reflections, eager_assoc)
176   res = super
177   
178   reflections.each do |r|
179     res[r[:eager_loader]][:association] = r[:name]
180   end
181 
182   res
183 end