Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport PG ranges #676
Comments
killercup
added
good first issue
help wanted
postgres
labels
Feb 11, 2017
This comment has been minimized.
|
I wouldn't quite call this easy for newcomers, but it is at least fairly isolated. |
This comment has been minimized.
|
I'm working on that now, I just have some questions:
|
This comment has been minimized.
|
Fixed by #1021 |
Eijebong
closed this
Aug 5, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sgrif commentedFeb 11, 2017
The SQL type should be
Range<ST: CanAppearInRange>. We should provide an impl to/from SQL for(Bound<T>, Bound<T>) where T: FromSql<ST, Pg>.Boundis currently unstable, so we'll need to stick this behind the unstable feature. It appears to be on track for stabilization soon though, so I don't think we need to support any stable types.For this to work with codegen we'll also need the following:
The impls for serialization/deserialization look pretty straightforward. Format appears to be a one byte set of flags (inclusive vs exclusive, whether start or end are unbounded), 4 byte length for upper value followed by data if present, 4 byte length for lower value followed by data if present.