2020/06/07分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Merging conditions on the same column no longer maintain both conditions, and will be consistently replaced by the latter condition in Rails 6.2.
- Support
relation.and
for intersection as Set theory.
Deprecate inconsistent behavior that merging conditions on the same column
activerecord/lib/active_record/relation/where_clause.rb
の修正です。
merge
のconditionに同じカラムを指定した場合の挙動が、指定された両方のconditionが使用される(conditionの指定内容による)という挙動がdeprecateになりました。
6.2では、conditionの内容に問わず、後に指定されたconditionが必ず使用されるようになります。
Make predicate builder about 2x faster
activerecord/lib/active_record/relation/predicate_builder.rb
、
activerecord/lib/active_record/relation/predicate_builder/base_handler.rb
の修正です。
PredicateBuilder::BaseHandler
でやっていた処理を直接build
メソッドで行うようにして、PredicateBuilder::BaseHandler
を削除するようリファクタリングしています。
Support relation.and
for intersection as Set theory
Active Recordの修正です。
relationsのintersectionを取得する為のrelation.and
メソッドを追加しています。
david_and_mary = Author.where(id: [david, mary]) mary_and_bob = Author.where(id: [mary, bob]) david_and_mary.merge(mary_and_bob) # => [mary, bob] david_and_mary.and(mary_and_bob) # => [mary] david_and_mary.or(mary_and_bob) # => [david, mary, bob]
Case insensitive mutation tracking
activerecord/lib/active_record/connection_adapters/postgresql/oid/macaddr.rb
、
activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb
の修正です。
PostgreSQLのMac addressとUUID attributeについて、値が変更されたかチェックする際に、アルファベットの大文字小文字の違いを無視するよう修正しています。
各CHANGELOGの修正です。
各エントリーのフォーマット、グラマーの修正等をまとめて行っています。