Class: Torque::PostgreSQL::PredicateBuilder::EnumeratorLazyHandler

Inherits:
ActiveRecord::PredicateBuilder::ArrayHandler
  • Object
show all
Defined in:
lib/torque/postgresql/predicate_builder/enumerator_lazy_handler.rb

Constant Summary collapse

Timeout =
Class.new(::Timeout::Error)

Instance Method Summary collapse

Instance Method Details

#call(attribute, value) ⇒ Object



9
10
11
12
13
# File 'lib/torque/postgresql/predicate_builder/enumerator_lazy_handler.rb', line 9

def call(attribute, value)
  with_timeout do
    super(attribute, limit.nil? ? value.force : value.first(limit))
  end
end