ormx 0.0.1-alpha

lightweight procedural macros bringing orm-like features to sqlx
docs.rs failed to build ormx-0.0.1-alpha
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: ormx-0.11.0

Lightweight derive macros for bringing orm-like features to sqlx.

Example: Table

#[derive(ormx::Table)]
#[ormx(table = "users", id = user_id, insertable)]
struct User {
#[ormx(column = "id")]
user_id: u32,
first_name: String,
last_name: String,
#[ormx(get_optional(&str))]
email: String,
#[ormx(default, set)]
last_login: Option<NaiveDateTime>,
}

Example: Patch

#[derive(ormx::Patch)]
#[ormx(table_name = "users", table = User, id = "id")]
struct UpdateName {
first_name: String,
last_name: String,
}

Documentation

See the docs of derive(Table) and derive(Patch).