emixdiesel

Crates.ioemixdiesel
lib.rsemixdiesel
version0.6.0
created_at2026-01-11 15:49:01.93682+00
updated_at2026-01-11 15:49:01.93682+00
descriptionAsync Diesel repositories, filters, and migrations aligned with EssentialMix patterns.
homepage
repositoryhttps://github.com/asm2025/essentialmix-rs
max_upload_size
id2035994
size62,903
asm (asm2025)

documentation

README

emixdiesel

emixdiesel offers repository traits, DTO helpers, and opinionated filters for building async Diesel-based data access layers that stay compatible with the rest of EssentialMix.

Feature Flags

  • sqlite / postgres / mysql: Enable the respective Diesel backends.
  • sqlite-bundled, postgres-bundled, mysql-bundled: Pull in vendored client libraries so you can build without system dependencies.
  • full: Turn on every backend (non-bundled).
  • full-bundled: Turn on every backend with vendored client libraries.
[dependencies]
emixdiesel = { path = "../../crates/db/diesel", features = ["postgres"] }

Quick Example

use emixdiesel::prelude::*;
use emixdiesel::{ClosureFilter, TFilterQuery};
use crate::schema::posts::dsl::*;

// Start from any boxed Diesel query (useful inside repositories).
let query = posts.into_boxed();

// Wrap your filtering logic so it composes with the repository traits.
let only_published = ClosureFilter::new(|q| q.filter(published.eq(true)));

let filtered = only_published.apply(query);
Commit count: 272

cargo fmt