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

Method load_one

src/query/loader.rs:84–93  ·  view source on GitHub ↗
(&self, stmt: S, db: &C)

Source from the content-addressed store, hash-verified

82 type Model = M;
83
84 async fn load_one<R, S, C>(&self, stmt: S, db: &C) -> Result<Vec<Option<R::Model>>, DbErr>
85 where
86 C: ConnectionTrait,
87 R: EntityTrait,
88 R::Model: Send + Sync,
89 S: EntityOrSelect<R>,
90 <<Self as LoaderTrait>::Model as ModelTrait>::Entity: Related<R>,
91 {
92 self.as_slice().load_one(stmt, db).await
93 }
94
95 async fn load_many<R, S, C>(&self, stmt: S, db: &C) -> Result<Vec<Vec<R::Model>>, DbErr>
96 where

Callers 7

test_load_oneFunction · 0.80
test_load_one_same_cakeFunction · 0.80
test_load_one_emptyFunction · 0.80
loader_load_oneFunction · 0.80
loader_load_manyFunction · 0.80
find_one_to_oneFunction · 0.80

Calls 9

query_errFunction · 0.85
extract_keyFunction · 0.85
prepare_conditionFunction · 0.85
selectMethod · 0.80
into_iterMethod · 0.80
newFunction · 0.50
allMethod · 0.45
insertMethod · 0.45
getMethod · 0.45

Tested by 6

test_load_oneFunction · 0.64
test_load_one_same_cakeFunction · 0.64
test_load_one_emptyFunction · 0.64
loader_load_oneFunction · 0.64
loader_load_manyFunction · 0.64