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

Function save_custom_active_model

examples/basic/src/operation.rs:77–92  ·  view source on GitHub ↗
(db: &DbConn)

Source from the content-addressed store, hash-verified

75}
76
77async fn save_custom_active_model(db: &DbConn) -> Result<(), DbErr> {
78 let pineapple = form::InputModel {
79 name: "Pineapple".to_owned(),
80 }
81 .into_active_model();
82
83 let pineapple = pineapple.save(db).await?;
84
85 println!("Saved: {pineapple:?}");
86
87 let result = pineapple.delete(db).await?;
88
89 println!("Deleted: {result:?}");
90
91 Ok(())
92}

Callers 1

all_about_operationFunction · 0.85

Calls 3

into_active_modelMethod · 0.80
saveMethod · 0.80
deleteMethod · 0.45

Tested by

no test coverage detected