MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / join_as

Method join_as

src/query/helper.rs:405–413  ·  view source on GitHub ↗

Join via [`RelationDef`] with table alias.

(mut self, join: JoinType, mut rel: RelationDef, alias: I)

Source from the content-addressed store, hash-verified

403
404 /// Join via [`RelationDef`] with table alias.
405 fn join_as<I>(mut self, join: JoinType, mut rel: RelationDef, alias: I) -> Self
406 where
407 I: IntoIden,
408 {
409 let alias = alias.into_iden();
410 rel.to_tbl = rel.to_tbl.alias(SeaRc::clone(&alias));
411 self.query().join(join, rel.to_tbl.clone(), rel);
412 self
413 }
414
415 /// Join via [`RelationDef`] with table alias but in reverse direction.
416 /// Assume when there exist a relation A to B.

Callers 5

find_also_linkedMethod · 0.80
find_with_linkedMethod · 0.80
find_linkedFunction · 0.80

Implementers 1

cursor.rssrc/executor/cursor.rs

Calls 2

joinMethod · 0.80
queryMethod · 0.45

Tested by 1