This commit is contained in:
Chris Tsang 2021-06-06 18:13:53 +08:00
parent df3e44a7b0
commit 989845f422
2 changed files with 5 additions and 2 deletions

View File

@ -17,7 +17,7 @@
Inspired by ActiveRecord, Eloquent and TypeORM, SeaORM aims to provide you an intuitive and ergonomic
API to make working with databases in Rust a first-class experience.
> This is an early WIP of SeaORM, and is not yet published. See [example](examples/sqlx-mysql/src/main.rs) for demo usage.
> This is an early WIP of SeaORM, and is not yet published. See [example](examples/sqlx-mysql/src) for demo usage.
## Features

View File

@ -25,7 +25,10 @@ pub async fn insert_and_update(db: &Database) -> Result<(), ExecErr> {
println!();
println!("Inserted: {:?}\n", res);
let pear = fruit::Entity::find_by(res.last_insert_id).one(db).await.map_err(|_| ExecErr)?;
let pear = fruit::Entity::find_by(res.last_insert_id)
.one(db)
.await
.map_err(|_| ExecErr)?;
println!();
println!("Pear: {:?}\n", pear);