Class: ActiveRecord::Refined::AST::DistinctFrom

Inherits:
Predicate show all
Defined in:
lib/active_record/refined/ast.rb

Overview

IS [NOT] DISTINCT FROM, spelled IS / IS NOT on SQLite and <=> on MySQL. NULL compares as a value here, which is what separates these from = and <>.

Instance Method Summary collapse

Methods included from Connectives

#!, #&, #|

Methods inherited from Node

#as, #asc, #collate, #desc

Constructor Details

#initialize(operand, value, negated: false) ⇒ DistinctFrom



2514
2515
2516
2517
2518
# File 'lib/active_record/refined/ast.rb', line 2514

def initialize(operand, value, negated: false)
  @operand = operand
  @value = value
  @negated = negated
end