Skip to content

robinstraub/fabrique

Repository files navigation

Fabrique

CI codecov docs.rs

A lightweight ORM for Rust that combines ease of use with Rust's safety guarantees.

Features

  • Fluent API — Expressive, chainable query building
  • Derive-based — Models and factories generated from struct definitions
  • Factory support — Test data generation with relationship handling

Quick Example

use fabrique::prelude::*;

#[derive(Model, Factory)]
pub struct Product {
    #[fabrique(primary_key)]
    pub id: Uuid,
    pub name: String,
    pub price_cents: i32,
}

// Query
let products = Product::query()
    .select()
    .r#where(Product::PRICE_CENTS, ">=", 1000)
    .get(&pool)
    .await?;

// Create test data
let product = Product::factory()
    .name("Anvil 3000".to_string())
    .create(&pool)
    .await?;

Documentation

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages