Types are mapped to string representations as there is no client side data type such as a range that is compatible (Kotlin ranges only implement open/closed on upper bounds). This is consistent with JSON, TSVECTOR types and uses OTHER type to bind the literal value.
👷 🚧 Add some support for TS Range type https://www.postgresql.org/docs/16/rangetypes.html#RANGETYPES-EXAMPLES
Types are mapped to string representations as there is no client side data type such as a range that is compatible (Kotlin ranges only implement open/closed on upper bounds). This is consistent with JSON, TSVECTOR types and uses OTHER type to bind the literal value.
Range functions https://www.postgresql.org/docs/16/functions-range.html are used to work with ranges e.g extract lower and upper values to the client types
LocalDateTime
andOffSetDateTime
Also add basic support for
EXCLUDE
table constraints for range supported indexesMultiRange support (Postgresql 14 or higher)
Allows useful arithmetic on ranges
e.g identify the available time slots that are not occupied by any appointments within a specified time range.
Note: 🧜 Merge this after https://github.com/cashapp/sqldelight/pull/5274
TODO: Create issue for PR More tests e.g cast
SELECT '("2010-01-01 14:30:00+00","2010-01-01 15:30:00+00"]'::TSTZRANGE