Range type support #7070
beikov
started this conversation in
Design Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Some DBMS support ranges natively i.e. have a custom SQL types for ranges: https://www.postgresql.org/docs/current/rangetypes.html
It would be cool if we could add support for this. If the DBMS doesn't support that, we could treat it like a composite type with properties
min
,max
,minInclusive
andmaxInclusive
that map to multiple columns through the custom composite type facility, similar to how we did it forOffsetDateTime
/ZonedDateTime
.The idea is to introduce two interfaces:
In addition to adding the type, I suggest adding a
overlaps
predicate that checks if two ranges overlap and acontains
predicate that checks if a value is within a range.Beta Was this translation helpful? Give feedback.
All reactions