Readme
This commit is contained in:
parent
69a52b6c7e
commit
5c953512be
23
README.md
23
README.md
@ -3,14 +3,14 @@
|
||||
<h1>SeaORM</h1>
|
||||
|
||||
<p>
|
||||
<strong>An [adjective] ORM for Rust</strong>
|
||||
<strong>An intuitive ORM for Rust</strong>
|
||||
</p>
|
||||
|
||||
<sub>Built with ❤️ by 🌊🦀🐠</sub>
|
||||
|
||||
</div>
|
||||
|
||||
# SeaORM - An [adjective] ORM for Rust
|
||||
# SeaORM - An intuitive ORM for Rust
|
||||
|
||||
## Features
|
||||
|
||||
@ -22,11 +22,26 @@ SeaORM is new to the party and rely on SQLx, so async support is not an aftertho
|
||||
|
||||
Built upon SeaQuery (a dynamic query builder), SeaORM allows you to build complex queries without 'fighting the ORM'.
|
||||
|
||||
|
||||
3. Testable
|
||||
|
||||
Use mock connection to write unit tests for your logic.
|
||||
Use mock connections to write unit tests for your logic.
|
||||
|
||||
4. API oriented
|
||||
|
||||
Quickly build search models that help you filter, sort and paginate data in APIs.
|
||||
|
||||
## Goals
|
||||
|
||||
1. Intuitive and familiar
|
||||
|
||||
Inspired by ActiveRecord, Eloquent and TypeORM, SeaORM aims to provide you an ergonomic and intuitive
|
||||
API to make working with databases in Rust a first-class experience.
|
||||
|
||||
2. Forwarding looking
|
||||
|
||||
We are ready to embrace Rocket 0.5 to make building web services in Rust productive and enjoyable.
|
||||
|
||||
3. Strong typed and dynamic
|
||||
|
||||
SeaORM construct queries at runtime, allowing you to develop flexible and powerful queries. While
|
||||
the expressive Rust type system would help you in maintaining a complex codebase.
|
||||
|
@ -2,14 +2,14 @@ use super::{Column, Identity, Model, Relation};
|
||||
use crate::Select;
|
||||
use sea_query::Iden;
|
||||
use std::fmt::Debug;
|
||||
use strum::IntoEnumIterator;
|
||||
pub use strum::IntoEnumIterator as Iterable;
|
||||
|
||||
pub trait Entity: Iden + Default + Debug {
|
||||
type Model: Model;
|
||||
|
||||
type Column: Column + IntoEnumIterator;
|
||||
type Column: Column + Iterable;
|
||||
|
||||
type Relation: Relation + IntoEnumIterator;
|
||||
type Relation: Relation + Iterable;
|
||||
|
||||
fn primary_key() -> Identity;
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
use crate::Statement;
|
||||
use crate::{entity::*, RelationDef};
|
||||
use crate::{entity::*, Iterable, RelationDef, Statement};
|
||||
use core::fmt::Debug;
|
||||
use core::marker::PhantomData;
|
||||
pub use sea_query::JoinType;
|
||||
use sea_query::{Expr, Iden, IntoIden, QueryBuilder, SelectStatement};
|
||||
use std::rc::Rc;
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Select<'s, E: 'static>
|
||||
|
Loading…
x
Reference in New Issue
Block a user