SeaORM
🐚 An async & dynamic ORM for Rust
[](https://crates.io/crates/sea-orm)
[](https://docs.rs/sea-orm)
[](https://github.com/SeaQL/sea-orm/actions/workflows/rust.yml)
Built with 🔥 by 🌊🦀🐚
# SeaORM
#### SeaORM is a relational ORM to help you build web services in Rust with the familiarity of dynamic languages.
[](https://www.sea-ql.org/SeaORM/docs/index)
[](https://github.com/SeaQL/sea-orm/tree/master/examples/basic)
[](https://github.com/SeaQL/sea-orm/tree/master/examples/rocket_example)
[](https://github.com/SeaQL/sea-orm/tree/master/examples/actix_example)
[](https://github.com/SeaQL/sea-orm/tree/master/examples/axum_example)
[](https://discord.com/invite/uCPdDXzbdv)
## Features
1. Async
Relying on [SQLx](https://github.com/launchbadge/sqlx), SeaORM is a new library with async support from day 1.
2. Dynamic
Built upon [SeaQuery](https://github.com/SeaQL/sea-query), SeaORM allows you to build complex queries without 'fighting the ORM'.
3. Testable
Use mock connections to write unit tests for your logic.
4. Service Oriented
Quickly build services that join, filter, sort and paginate data in APIs.
## A quick taste of SeaORM
### Entity
```rust
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "cake")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
pub name: String,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(has_many = "super::fruit::Entity")]
Fruit,
}
impl Related