mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
b5302d5a82
* Arel: Implemented DB-aware NULL-safe comparison * Fixed where clause inversion for NULL-safe comparison * Renaming "null_safe_eq" to "is_not_distinct_from", "null_safe_not_eq" to "is_distinct_from" [Dmytro Shteflyuk + Rafael Mendonça França]
18 lines
341 B
Ruby
18 lines
341 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Arel # :nodoc: all
|
|
module Nodes
|
|
class Equality < Arel::Nodes::Binary
|
|
def operator; :== end
|
|
alias :operand1 :left
|
|
alias :operand2 :right
|
|
end
|
|
|
|
%w{
|
|
IsDistinctFrom
|
|
IsNotDistinctFrom
|
|
}.each do |name|
|
|
const_set name, Class.new(Equality)
|
|
end
|
|
end
|
|
end
|