Changes between Initial Version and Version 1 of Ticket #24169
- Timestamp:
- Jan 17, 2015, 1:02:42 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24169 – Description
initial v1 1 ArrayField's lookup.py uses the @> operator for __contains, the <@ operator for __contained_by, and the && operator for__overlap.1 ArrayField's lookup.py uses the @> operator for !__contains, the <@ operator for !__contained_by, and the && operator for !__overlap. 2 2 3 When the field uses CharField (Postgres' varchar()), __contains works, but __contained_by and__overlap do not, as Postgres does not define <@ and && operators for an array of varchar[] (it does for text[]).3 When the field uses CharField (Postgres' varchar()), !__contains works, but !__contained_by and !__overlap do not, as Postgres does not define <@ and && operators for an array of varchar[] (it does for text[]). 4 4 5 __contains works because, in array.py, there is a custom lookup, "ArrayOverlap", the outputs a cast to cast the array query value to, say, "::varchar(10)[]"5 !__contains works because, in array.py, there is a custom lookup, "ArrayOverlap", the outputs a cast to cast the array query value to, say, "::varchar(10)[]" 6 6 7 If there are similar custom lookups for __contained_by and__overlap, these then work.7 If there are similar custom lookups for !__contained_by and !__overlap, these then work.