-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend range functions to support nullable and multirange #4193
Extend range functions to support nullable and multirange #4193
Conversation
838fd7d
to
eeaa1ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for unifying these functions. The change looks mostly fine, but I think we miss a helper type for multirange_merge
+ a test case for #[auto_type]
for this function.
/// # Ok(()) | ||
/// # } | ||
/// ``` | ||
#[cfg(feature = "postgres_backend")] | ||
fn range_merge<T1: RangeHelper, T2: RangeHelper<Inner = T1::Inner>>(lhs: T1, rhs: T2) -> Range<T1::Inner>; | ||
#[sql_name = "range_merge"] | ||
fn multirange_merge<R: MultirangeOrNullableMultirange + SingleValue>(multirange: R) -> R::Range; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add a helper type definition for this new function + a test variant in the #[auto_type]
test case module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! for the review. I updated that.
b9202d8
to
36a76a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
This PR extends the range functions to suportt multirange and nullable types, folowing the behavior of the postgres functions
Please review after #4182 and #4179 be merged