#diesel #generation #crud #codegen #database

deprecated libdsync-hasezoey

Generate rust structs & query functions from diesel schema files

3 releases (breaking)

0.3.0+deprecated Aug 24, 2024
0.2.0 Jul 9, 2023
0.1.0 Jul 6, 2023

#38 in #crud

Download history 140/week @ 2024-08-22 11/week @ 2024-08-29 13/week @ 2024-09-12 27/week @ 2024-09-19 22/week @ 2024-09-26 2/week @ 2024-10-03

64 downloads per month
Used in dsync-hasezoey

MIT/Apache

74KB
1.5K SLoC

libdsync-hasezoey

This is a fork of Wulf's dsync with some Pull Requests merged, see Difference with original

For a binary, use dsync-hasezoey crates.io or dsync-hasezoey github

Usage:

use std::{collections::HashMap, path::PathBuf};
use dsync_hasezoey::{GenerationConfig, TableOptions};

pub fn main() {
    let dir = env!("CARGO_MANIFEST_DIR");

    dsync_hasezoey::generate_files(
        PathBuf::from_iter([dir, "src/schema.rs"]), 
        PathBuf::from_iter([dir, "src/models"]), 
        GenerationConfig { /* ... your generation options ... */ }
    );
}

docs.rs Documentation

Dependencies

~1.5MB
~36K SLoC