enum_as not working as expected #274
Answered
by
tyt2y3
mohantaylor
asked this question in
Q&A
-
DescriptionTrying to get a count of a number of rows with an alias for the column. Below is the example code that I was expecting to generate a select using the alias 'mycount' but the generated sql does not include this. Steps to Reproduce
Expected BehaviorSQL output expected was:
Actual Behavior
Reproduces How OftenAlways reproducible Versionssea-query = "0.23.0" Additional Information |
Beta Was this translation helpful? Give feedback.
Answered by
tyt2y3
Mar 22, 2022
Replies: 1 comment
-
As enum is not intended for this, use https://docs.rs/sea-query/latest/sea_query/query/struct.SelectStatement.html#method.expr_as instead |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tyt2y3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As enum is not intended for this, use https://docs.rs/sea-query/latest/sea_query/query/struct.SelectStatement.html#method.expr_as instead