diff options
author | Dmytro Shteflyuk <kpumuk@kpumuk.info> | 2018-11-15 14:49:55 -0500 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2018-11-15 14:49:55 -0500 |
commit | b5302d5a820b078b6488104dd695a679e5a49623 (patch) | |
tree | a8f393036fd1b72c33d9ed448f6ada379b2dd429 /activerecord/test/cases/relation | |
parent | d1c76dd4b0d308db432afb56c7dafcbefbf4ee3a (diff) | |
download | rails-b5302d5a820b078b6488104dd695a679e5a49623.tar.gz rails-b5302d5a820b078b6488104dd695a679e5a49623.tar.bz2 rails-b5302d5a820b078b6488104dd695a679e5a49623.zip |
Arel: Implemented DB-aware NULL-safe comparison (#34451)
* 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]
Diffstat (limited to 'activerecord/test/cases/relation')
-rw-r--r-- | activerecord/test/cases/relation/where_clause_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation/where_clause_test.rb b/activerecord/test/cases/relation/where_clause_test.rb index 8703d238a0..0b06cec40b 100644 --- a/activerecord/test/cases/relation/where_clause_test.rb +++ b/activerecord/test/cases/relation/where_clause_test.rb @@ -92,12 +92,16 @@ class ActiveRecord::Relation original = WhereClause.new([ table["id"].in([1, 2, 3]), table["id"].eq(1), + table["id"].is_not_distinct_from(1), + table["id"].is_distinct_from(2), "sql literal", random_object ]) expected = WhereClause.new([ table["id"].not_in([1, 2, 3]), table["id"].not_eq(1), + table["id"].is_distinct_from(1), + table["id"].is_not_distinct_from(2), Arel::Nodes::Not.new(Arel::Nodes::SqlLiteral.new("sql literal")), Arel::Nodes::Not.new(random_object) ]) |