Method: Sequel::Model::Associations::AssociationReflection#eager_graph_limit_strategy

Defined in:
lib/sequel/model/associations.rb

#eager_graph_limit_strategy(strategy) ⇒ Object

The eager_graph limit strategy to use for this dataset



232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/sequel/model/associations.rb', line 232

def eager_graph_limit_strategy(strategy)
  if self[:limit] || !returns_array?
    strategy = strategy[self[:name]] if strategy.is_a?(Hash)
    case strategy
    when true
      true_eager_graph_limit_strategy
    when Symbol
      strategy
    else
      if returns_array? || offset
        :ruby
      end
    end
  end
end