Skip to content

How to alias a column during a select? #778

Closed Answered by seijikun
narigama asked this question in Q&A
Discussion options

You must be logged in to vote

This should work using something like:

let mut query = Query::select();
   query.expr_as(
       Expr::col(db::Table::Column::Foo),
       Alias::new("bar")
   )

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@seijikun
Comment options

Answer selected by narigama
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants