Module: ActiveRecord::Refined::AST::Connectives
Overview
&, | and ! -- AND, OR and NOT, what joins conditions into one
and negates them. A predicate carries them, and so do Sql and
Operation, whose SQL is read as a condition the moment it is
combined like one.
Included in those three and never imported into a refinement, as Predications is: a bare symbol is a column, and a column is not a condition.
Instance Method Summary collapse
-
#! ⇒ AST::Predicate
NOT (condition), negating anything; the negations SQL spells for itself,IS NOT NULLand its kin, have names of their own under Predications. -
#&(other) ⇒ AST::Predicate
AND. -
#|(other) ⇒ AST::Predicate
OR.
Instance Method Details
#! ⇒ AST::Predicate
NOT (condition), negating anything; the negations SQL spells for
itself, IS NOT NULL and its kin, have names of their own under
Predications.
Being here rather than only on Predicate is what keeps ! on Sql
and Operation from falling through to Ruby's own, which would
quietly answer false.
772 773 774 |
# File 'lib/active_record/refined/ast.rb', line 772 def ! Not.new(self) end |
#&(other) ⇒ AST::Predicate
AND.
752 753 754 |
# File 'lib/active_record/refined/ast.rb', line 752 def &(other) And.new(self, other) end |
#|(other) ⇒ AST::Predicate
OR.
758 759 760 |
# File 'lib/active_record/refined/ast.rb', line 758 def |(other) Or.new(self, other) end |