Skip to content

Join aliases: am I doing it right? Seem quite overcomplicated #120

Answered by tyt2y3
nappa85 asked this question in Q&A
Discussion options

You must be logged in to vote

I might not exactly get your scenario, but here is an example from SeaQuery

#[derive(Iden)]
pub struct MyAlias;

let query = Query::select()
    .from(Char::Table)
    .join_as(
        JoinType::RightJoin,
        Font::Table,
        MyAlias,
        Expr::tbl(Font::Table, Font::Id).equals(MyAlias, Char::FontId)
    )
    .to_owned();

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tyt2y3
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
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
Converted from issue

This discussion was converted from issue #119 on September 02, 2021 03:39.