Class: ActiveRecord::Refined::AST::ArrayPredicate
- Defined in:
- lib/active_record/refined/ast.rb
Overview
Comparisons against a PostgreSQL array column, named after the Ruby methods that mean the same thing: member? is Enumerable's element test, superset? and subset? are Set's whole-array containment, and intersect? is Array's "any element in common". Each name maps to one operator; the elements are rendered as an array literal, which PostgreSQL coerces to the column's element type, so any expression works as the operand and no schema lookup is needed.
Instance Method Summary collapse
-
#initialize(operand, operator, elements) ⇒ ArrayPredicate
constructor
A new instance of ArrayPredicate.
Methods included from Connectives
Methods inherited from Node
Constructor Details
#initialize(operand, operator, elements) ⇒ ArrayPredicate
Returns a new instance of ArrayPredicate.
2555 2556 2557 2558 2559 |
# File 'lib/active_record/refined/ast.rb', line 2555 def initialize(operand, operator, elements) @operand = operand @operator = operator @elements = elements end |