Skip to content
  • Sean Griffin's avatar
    302e9235
    Refactor tz aware types, add support for PG ranges · 302e9235
    Sean Griffin authored
    This is an alternate implementation to #22875, that generalizes a lot of
    the logic that type decorators are going to need, in order to have them
    work with arrays, ranges, etc. The types have the ability to map over a
    value, with the default implementation being to just yield that given
    value. Array and Range give more appropriate definitions.
    
    This does not automatically make ranges time zone aware, as they need to
    be added to the `time_zone_aware` types config, but we could certainly
    make that change if we feel it is appropriate. I do think this would be
    a breaking change however, and should at least have a deprecation cycle.
    
    Closes #22875.
    
    /cc @matthewd
    302e9235
    Refactor tz aware types, add support for PG ranges
    Sean Griffin authored
    This is an alternate implementation to #22875, that generalizes a lot of
    the logic that type decorators are going to need, in order to have them
    work with arrays, ranges, etc. The types have the ability to map over a
    value, with the default implementation being to just yield that given
    value. Array and Range give more appropriate definitions.
    
    This does not automatically make ranges time zone aware, as they need to
    be added to the `time_zone_aware` types config, but we could certainly
    make that change if we feel it is appropriate. I do think this would be
    a breaking change however, and should at least have a deprecation cycle.
    
    Closes #22875.
    
    /cc @matthewd
Loading