microrm 0.6.3

Lightweight ORM using sqlite as a backend
Documentation
use microrm::prelude::*;
use test_log::test;

mod common;

#[derive(Entity)]
struct KV {
    #[key]
    name: String,
    value: String,
}

#[derive(Schema)]
struct KVDB {
    entries: microrm::IDMap<KV>,
}

#[test]
fn repeated_uniqueness() {
    let (pool, db): (_, KVDB) = common::open_test_db!();
    let mut txn = pool.start().unwrap();

    db.entries
        .first()
        .first()
        .get(&mut txn)
        .expect_err("query with multiple uniqueness constraints");
}