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

Function add

examples/loco_example/src/controllers/notes.rs:31–38  ·  view source on GitHub ↗
(State(ctx): State<AppContext>, Json(params): Json<Params>)

Source from the content-addressed store, hash-verified

29}
30
31pub async fn add(State(ctx): State<AppContext>, Json(params): Json<Params>) -> Result<Response> {
32 let mut item = ActiveModel {
33 ..Default::default()
34 };
35 params.update(&mut item);
36 let item = item.insert(&ctx.db).await?;
37 format::json(item)
38}
39
40pub async fn update(
41 Path(id): Path<i32>,

Callers

nothing calls this directly

Calls 3

jsonFunction · 0.85
updateMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected