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

Inherits:
ActiveRecord::PredicateBuilder::ArrayHandler show all
Defined in:
lib/torque/postgresql/predicate_builder/enumerator_lazy_handler.rb,
sig/torque/postgresql/predicate_builder/enumerator_lazy_handler.rbs

Defined Under Namespace

Classes: Timeout

Instance Method Summary collapse

Methods included from ArrayHandler

#call_for_array

Instance Method Details

#call(attribute, value) ⇒ arel_node

Parameters:

  • attribute (arel_attribute)
  • value (Enumerator::Lazy[untyped, untyped])

Returns:

  • (arel_node)


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