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)
# SeaORM
#### SeaORM is a relational ORM to help you build web services in Rust with the familiarity of dynamic languages.
## Getting Started
[](https://discord.com/invite/uCPdDXzbdv)
Join our Discord server to chat with others in the SeaQL community!
+ [Getting Started](https://www.sea-ql.org/SeaORM/docs/index)
+ [Usage Example](https://github.com/SeaQL/sea-orm/tree/master/examples/basic)
+ [Rocket Example](https://github.com/SeaQL/sea-orm/tree/master/examples/rocket_example)
+ [Actix Example](https://github.com/SeaQL/sea-orm/tree/master/examples/actix_example)
+ [Axum Example](https://github.com/SeaQL/sea-orm/tree/master/examples/axum_example)
+ [Poem Example](https://github.com/SeaQL/sea-orm/tree/master/examples/poem_example)
## 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