che-orm 0.2.0

Typed SQLite ORM primitives for che-rest applications
Documentation
# che-orm

**English** | [Russian]README.md

`che-orm` is an experimental typed ORM for Rust. Its current runtime backend is
SQLite through `deadpool-sqlite`; models are decoded from rows generated by
procedural macros.

## Status

SQLite has an async pool, CRUD facade, transactions, relations, serializers,
and Atlas-based migrations. The PostgreSQL dialect can compile SQL and DDL, but
does not yet provide a connection pool or executor.

## Quick Start

```toml
[dependencies]
che-orm = "0.2"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
time = { version = "0.3", features = ["formatting", "parsing"] }
```

```rust
use che_orm::{Database, Model};
use time::OffsetDateTime;

#[derive(Debug, Model)]
#[orm(table = "users")]
struct User {
    #[orm(primary_key)]
    id: i64,
    #[orm(unique)]
    email: String,
    name: String,
    #[orm(auto_now_add)]
    created_at: OffsetDateTime,
    #[orm(auto_now)]
    updated_at: OffsetDateTime,
}

#[tokio::main]
async fn main() -> Result<(), che_orm::OrmError> {
    let database = Database::connect("app.db")?;
    database.create_table::<User>().await?;

    let user = database
        .create::<User>()
        .set(User::EMAIL, "alice@example.test")
        .set(User::NAME, "Alice")
        .execute()
        .await?;
    let loaded = database.get::<User>(user.id).await?;
    println!("{loaded:?}");
    Ok(())
}
```

`create_table` is suitable for tests and local experiments. Use Atlas migrations
for persistent application schemas.

The repository migration CLI is an example application command:

```bash
cargo run -p che-orm-examples --bin manage -- schema
```

## Documentation

- [English guides]docs/en/README.md
- [API examples]docs/en/api-examples.md
- [Russian documentation]README.md
- [Contributing]CONTRIBUTING.md
- [Security policy]SECURITY.md
- [Release checklist]docs/release-checklist.md

## Verification

```bash
cargo fmt --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cargo test -p che-orm --no-default-features --features postgres
cargo doc --workspace --no-deps
```