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

Method join_as_rev

src/query/helper.rs:418–426  ·  view source on GitHub ↗

Join via [`RelationDef`] with table alias but in reverse direction. Assume when there exist a relation A to B. You can reverse join B from A.

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

Source from the content-addressed store, hash-verified

416 /// Assume when there exist a relation A to B.
417 /// You can reverse join B from A.
418 fn join_as_rev<I>(mut self, join: JoinType, mut rel: RelationDef, alias: I) -> Self
419 where
420 I: IntoIden,
421 {
422 let alias = alias.into_iden();
423 rel.from_tbl = rel.from_tbl.alias(SeaRc::clone(&alias));
424 self.query().join(join, rel.from_tbl.clone(), rel);
425 self
426 }
427
428 /// Select lock
429 fn lock(mut self, lock_type: LockType) -> Self {

Callers

nothing calls this directly

Implementers 1

cursor.rssrc/executor/cursor.rs

Calls 2

joinMethod · 0.80
queryMethod · 0.45

Tested by

no test coverage detected