Changes between Initial Version and Version 1 of Ticket #24169


Ignore:
Timestamp:
Jan 17, 2015, 1:02:42 PM (10 years ago)
Author:
Joel Burton
Comment:

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.
     1ArrayField's lookup.py uses the @> operator for !__contains, the <@ operator for !__contained_by, and the && operator for !__overlap.
    22
    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[]).
     3When 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[]).
    44
    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)[]"
    66
    7 If there are similar custom lookups for __contained_by and __overlap, these then work.
     7If there are similar custom lookups for !__contained_by and !__overlap, these then work.
Back to Top