Module: Predicate::Native
- Includes:
- Expr
- Defined in:
- lib/predicate/nodes/native.rb
Constant Summary
Constants included from Expr
Instance Method Summary collapse
-
#and_split(attr_list) ⇒ Object
overriden because parent relies on free_variables, which raises an exception.
-
#attr_split ⇒ Object
overriden because parent relies on free_variables, which raises an exception.
- #evaluate(tuple) ⇒ Object
- #free_variables ⇒ Object
- #priority ⇒ Object
- #proc ⇒ Object
Methods included from Expr
#!, #&, #bind, #constant_variables, #constants, #contradiction?, #dyadic_priority, #identifier?, #literal?, #opaque?, #qualify, #rename, #sexpr, #tautology?, #to_hash, #to_postgres, #to_s, #to_sequel, #unqualify, #|
Methods included from Factory
#_factor_predicate, #and, #comp, #contradiction, #empty, #from_hash, #h, #has_size, #identifier, #in, #literal, #match, #native, #not, #opaque, #or, #pg_array_empty, #pg_array_literal, #pg_array_overlaps, #placeholder, #qualified_identifier, #sexpr, #tautology, #var, #vars
Instance Method Details
#and_split(attr_list) ⇒ Object
overriden because parent relies on free_variables, which raises an exception
13 14 15 16 17 |
# File 'lib/predicate/nodes/native.rb', line 13 def and_split(attr_list) # I possibly make references to those attributes, so # I can't be P2 [ self, tautology ] end |
#attr_split ⇒ Object
overriden because parent relies on free_variables, which raises an exception
21 22 23 |
# File 'lib/predicate/nodes/native.rb', line 21 def attr_split { nil => self } end |
#evaluate(tuple) ⇒ Object
25 26 27 |
# File 'lib/predicate/nodes/native.rb', line 25 def evaluate(tuple) proc.call(tuple) end |
#free_variables ⇒ Object
29 30 31 |
# File 'lib/predicate/nodes/native.rb', line 29 def free_variables raise NotSupportedError end |
#priority ⇒ Object
5 |
# File 'lib/predicate/nodes/native.rb', line 5 def priority; 90; end |
#proc ⇒ Object
7 8 9 |
# File 'lib/predicate/nodes/native.rb', line 7 def proc self[1] end |