-
-
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 pg lower function to support Multirange #4179
extend pg lower function to support Multirange #4179
Conversation
0911151
to
64c9302
Compare
The autotype test is broken
I tried to follow the |
64c9302
to
d0f0494
Compare
/// # Ok(()) | ||
/// # } | ||
/// ``` | ||
#[cfg(feature = "postgres_backend")] | ||
fn lower<T: RangeHelper>(range: T) -> Nullable<<T as RangeHelper>::Inner>; | ||
fn lower<Rang: MultirangeOrRangeMaybeNullable<Inner=T> + SingleValue, T: SingleValue>(range: Rang) -> Nullable<T>; |
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.
fn lower<Rang: MultirangeOrRangeMaybeNullable<Inner=T> + SingleValue, T: SingleValue>(range: Rang) -> Nullable<T>; | |
fn lower<Rang: MultirangeOrRangeMaybeNullable + SingleValue>(range: Rang) -> Nullable<Rang::Inner>; |
We should be able to remove the T
type here in favor of using the associated type as return type directly. That should hopefully also allow the type lower
to be unchanged and remain compatible with #[auto_type]
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 🙏🏽 !
d0f0494
to
4e8b1f1
Compare
4e8b1f1
to
f898510
Compare
Extending the work of #4159, this PR updates one Range function which also support multi-range.
This is a small PR to check the format, once approved I'm going to implement for the other methods.
I also add more example testing nullability and simplify the example removing the table and only use the select.