ExpressionMethods subset for Untyped
#4929
Closed
LucaCappelletti94
started this conversation in
Ideas
Replies: 1 comment
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.
Backend
PostgreSQL, SQLite
What do you want to add to diesel?
At this time,
ExpressionMethodsis not implemented forUntyped, and with good reason as several of the methods therein cannot, at least with the present trait bounds, be ever implemented forUntyped. That being said, several methods in this trait can be implemented forUntyped, and I believe they should be available as otherwise it severely limits what is filtrable in untyped dynamic selects.Going in alphabetical order, I believe that the following should be implementable for
Untyped:ascdescis_not_nullis_nullFor completeness sake and to avoid errors, here are the other methods which I believe cannot be implemented for
Untyped:betweeneqeq_anygegtleltnene_allnot_betweenImplementation notes
Ideally, if API breaking was not an issue, I would split the methods into two traits, one for the non implementable methods and another for the methods which can be implemented, and then have the former have the latter as super-trait.
Since API breaking is a concern, for the time being I would propose to create a separate
UntypedExpressionMethodstrait, implement it forUntyped, and later on at the next major release we could do the trait mitosis described above.Additional details
No response
Checklist
All reactions