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 the Sub numeric operation is in a private module : diesel::expression::ops::numeric::Sub
My output type should be something like:
diesel::expression::ops::numeric::Sub<
post_aggregates::comments,
post_actions::read_comments_amount
>
Is there any way to get the type from a numeric operation?
Thanks in advance.
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_amountThis unfortunately can't use
auto_type, and I also can't strictly define the type, since theSubnumeric operation is in a private module :diesel::expression::ops::numeric::SubMy output type should be something like:
Is there any way to get the type from a numeric operation?
Thanks in advance.