Readme
This commit is contained in:
parent
e6b5d3ebdc
commit
9be7440e58
10
README.md
10
README.md
@ -25,8 +25,8 @@ This is an early release of SeaORM, the API is not stable yet.
|
|||||||
```
|
```
|
||||||
|
|
||||||
[](https://www.sea-ql.org/SeaORM/docs/index)
|
[](https://www.sea-ql.org/SeaORM/docs/index)
|
||||||
[](https://github.com/SeaQL/sea-orm/tree/master/examples)
|
[](https://github.com/SeaQL/sea-orm/tree/master/examples)
|
||||||
[](https://github.com/SeaQL/sea-orm/issues/37)
|
[](https://github.com/SeaQL/sea-orm/tree/master/examples/rocket_example)
|
||||||
[](https://discord.com/invite/uCPdDXzbdv)
|
[](https://discord.com/invite/uCPdDXzbdv)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
@ -68,10 +68,8 @@ let cheese: cake::Model = cheese.unwrap();
|
|||||||
let fruits: Vec<fruit::Model> = cheese.find_related(Fruit).all(db).await?;
|
let fruits: Vec<fruit::Model> = cheese.find_related(Fruit).all(db).await?;
|
||||||
|
|
||||||
// find related models (eager)
|
// find related models (eager)
|
||||||
let cake_with_fruits: Vec<(cake::Model, Vec<fruit::Model>)> = Cake::find()
|
let cake_with_fruits: Vec<(cake::Model, Vec<fruit::Model>)> =
|
||||||
.find_with_related(Fruit)
|
Cake::find().find_with_related(Fruit).all(db).await?;
|
||||||
.all(db)
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
```
|
```
|
||||||
### Insert
|
### Insert
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
1. Modify the `url` var in `Rocket.toml` to point to your chosen database
|
1. Modify the `url` var in `Rocket.toml` to point to your chosen database
|
||||||
|
|
||||||
1. Turn on the appropriate database feature for your chosen db in `Cargo.toml` (the `default = ["sqlx-mysql"]`)
|
1. Turn on the appropriate database feature for your chosen db in `Cargo.toml` (the `default = ["sqlx-postgres"]` line)
|
||||||
|
|
||||||
1. `cargo run` to start the server
|
1. `cargo run` to start the server
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! [](https://www.sea-ql.org/SeaORM/docs/index)
|
//! [](https://www.sea-ql.org/SeaORM/docs/index)
|
||||||
//! [](https://github.com/SeaQL/sea-orm/tree/master/examples)
|
//! [](https://github.com/SeaQL/sea-orm/tree/master/examples)
|
||||||
//! [](https://github.com/SeaQL/sea-orm/issues/37)
|
//! [](https://github.com/SeaQL/sea-orm/tree/master/examples/rocket_example)
|
||||||
//! [](https://discord.com/invite/uCPdDXzbdv)
|
//! [](https://discord.com/invite/uCPdDXzbdv)
|
||||||
//!
|
//!
|
||||||
//! ## Features
|
//! ## Features
|
||||||
|
Loading…
x
Reference in New Issue
Block a user