Indentation

This commit is contained in:
Billy Chan 2021-09-20 16:26:03 +08:00 committed by Chris Tsang
parent 5c8caddf1f
commit 2176bad009
2 changed files with 8 additions and 24 deletions

View File

@ -29,7 +29,7 @@ SeaORM is a relational ORM to help you build light weight and concurrent web ser
1. Async 1. Async
Relying on [SQLx](https://github.com/launchbadge/sqlx), SeaORM is a new library with async support from day 1. Relying on [SQLx](https://github.com/launchbadge/sqlx), SeaORM is a new library with async support from day 1.
```rust ```rust
// execute multiple queries in parallel // execute multiple queries in parallel
@ -39,7 +39,7 @@ let cakes_and_fruits: (Vec<cake::Model>, Vec<fruit::Model>) =
2. Dynamic 2. Dynamic
Built upon [SeaQuery](https://github.com/SeaQL/sea-query), SeaORM allows you to build complex queries without 'fighting the ORM'. Built upon [SeaQuery](https://github.com/SeaQL/sea-query), SeaORM allows you to build complex queries without 'fighting the ORM'.
```rust ```rust
// build subquery with ease // build subquery with ease
@ -59,11 +59,9 @@ let cakes_with_filling: Vec<cake::Model> = cake::Entity::find()
``` ```
[more on SeaQuery](https://docs.rs/sea-query/*/sea_query/)
3. Testable 3. Testable
Use mock connections to write unit tests for your logic. Use mock connections to write unit tests for your logic.
```rust ```rust
// Setup mock connection // Setup mock connection
@ -100,11 +98,9 @@ assert_eq!(
); );
``` ```
[more on testing](/docs/write-test/mock)
4. Service oriented 4. Service oriented
Quickly build services that join, filter, sort and paginate data in APIs. Quickly build services that join, filter, sort and paginate data in APIs.
```rust ```rust
#[get("/?<page>&<posts_per_page>")] #[get("/?<page>&<posts_per_page>")]
@ -140,10 +136,6 @@ async fn list(
} }
``` ```
[full Rocket example](https://github.com/SeaQL/sea-orm/tree/master/examples/rocket_example)
We are building more examples for other web frameworks too.
## A quick taste of SeaORM ## A quick taste of SeaORM
### Select ### Select

View File

@ -119,8 +119,6 @@
//! # } //! # }
//! ``` //! ```
//! //!
//! [more on SeaQuery](https://docs.rs/sea-query/*/sea_query/)
//!
//! 3. Testable //! 3. Testable
//! //!
//! Use mock connections to write unit tests for your logic. //! Use mock connections to write unit tests for your logic.
@ -164,8 +162,6 @@
//! # } //! # }
//! ``` //! ```
//! //!
//! [more on testing](/docs/write-test/mock)
//!
//! 4. Service oriented //! 4. Service oriented
//! //!
//! Quickly build services that join, filter, sort and paginate data in APIs. //! Quickly build services that join, filter, sort and paginate data in APIs.
@ -204,10 +200,6 @@
//! } //! }
//! ``` //! ```
//! //!
//! [full Rocket example](https://github.com/SeaQL/sea-orm/tree/master/examples/rocket_example)
//!
//! We are building more examples for other web frameworks too.
//!
//! ## A quick taste of SeaORM //! ## A quick taste of SeaORM
//! //!
//! ### Select //! ### Select