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

Function insert_baker

tests/loader_tests.rs:221–230  ·  view source on GitHub ↗
(db: &DbConn, name: &str, bakery_id: i32)

Source from the content-addressed store, hash-verified

219}
220
221pub async fn insert_baker(db: &DbConn, name: &str, bakery_id: i32) -> Result<baker::Model, DbErr> {
222 baker::ActiveModel {
223 name: Set(name.to_owned()),
224 contact_details: Set(serde_json::json!({})),
225 bakery_id: Set(Some(bakery_id)),
226 ..Default::default()
227 }
228 .insert(db)
229 .await
230}
231
232pub async fn insert_cake(
233 db: &DbConn,

Callers 4

loader_load_oneFunction · 0.85
loader_load_manyFunction · 0.85
loader_load_many_multiFunction · 0.85
loader_load_many_to_manyFunction · 0.85

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected