You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by dessalines January 28, 2025
I'd like to use a subtract operation be used as a select_expression.
This gets the number of unread comments in a post: post_aggregates::comments - post_actions::read_comments_amount
This unfortunately can't use auto_type, and I also can't strictly define the type, since the Sub numeric operation is in a private module : diesel::expression::ops::numeric::Sub
Is there any way to get the type from a numeric operation?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
dessalines
changed the title
Export SQL numeric operations from diesel::expression::ops::numeric, and auto-type them.
Export SQL numeric operations from diesel::expression::ops::numeric , and auto-type them.
Jan 29, 2025
Discussed in #4461
Originally posted by dessalines January 28, 2025
I'd like to use a subtract operation be used as a
select_expression
.This gets the number of unread comments in a post:
post_aggregates::comments - post_actions::read_comments_amount
This unfortunately can't use
auto_type
, and I also can't strictly define the type, since theSub
numeric operation is in a private module :diesel::expression::ops::numeric::Sub
My output type should be something like:
Is there any way to get the type from a numeric operation?
Thanks in advance.
The text was updated successfully, but these errors were encountered: