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

Method find_linked_recursive

src/entity/model.rs:42–50  ·  view source on GitHub ↗

Find linked Models with a recursive CTE for self-referencing relation chains

(&self, l: L)

Source from the content-addressed store, hash-verified

40 #[doc(hidden)]
41 /// Find linked Models with a recursive CTE for self-referencing relation chains
42 fn find_linked_recursive<L>(&self, l: L) -> Select<L::ToEntity>
43 where
44 L: Linked<FromEntity = Self::Entity, ToEntity = Self::Entity>,
45 {
46 // Have to do this because L is not Clone
47 let link = l.link();
48 let initial_query = self.find_linked(l);
49 find_linked_recursive(initial_query, link)
50 }
51
52 /// Delete a model
53 async fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr>

Callers

nothing calls this directly

Calls 3

find_linked_recursiveFunction · 0.85
linkMethod · 0.45
find_linkedMethod · 0.45

Tested by

no test coverage detected