Skip to content

A type-driven and high-performance ORM framework in Rust

License

Notifications You must be signed in to change notification settings

dark-flames/yukino-dev

Repository files navigation

yukino-dev

A type-driven and high performance ORM framework

Features

  • Association
  • Calculation push-down
  • Type driven

Example

// entity.rs
#[derive(Entity)]
pub struct Meeting {
    #[id]
    pub id: u32,
    pub start_time: u64,
    pub end_time: u64
}

// main.rs 
fn meeting_length(id: u32) -> QueryResult<u64> {
    Meeting::all()
        .filter(|m| eq!(m.id, id))
        .first()
        .map(|m| m.end_time - m.start_time)
        .exec()
}

Generated query:

SELECT (m.end_time - m.start_time)
FROM meeting m
WHERE m.id = ? LIMIT 1;

About

A type-driven and high-performance ORM framework in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages