Docs
This commit is contained in:
parent
182c96e384
commit
2ac8fe664e
@ -81,9 +81,7 @@ let pear = fruit::ActiveModel {
|
||||
};
|
||||
|
||||
// insert one
|
||||
let res = Fruit::insert(pear).exec(db).await?;
|
||||
|
||||
println!("InsertResult: {}", res.last_insert_id);
|
||||
let pear = pear.insert(db).await?;
|
||||
|
||||
// insert many
|
||||
Fruit::insert_many(vec![apple, pear]).exec(db).await?;
|
||||
|
@ -94,9 +94,7 @@
|
||||
//! };
|
||||
//!
|
||||
//! // insert one
|
||||
//! let res = Fruit::insert(pear).exec(db).await?;
|
||||
//!
|
||||
//! println!("InsertResult: {}", res.last_insert_id);
|
||||
//! let pear = pear.insert(db).await?;
|
||||
//! # Ok(())
|
||||
//! # }
|
||||
//! # async fn function2(db: &DbConn) -> Result<(), DbErr> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user