Expand description
Build-time helper for easy-sql compilation data.
Scans your crate’s src/ directory for easy_sql::Table
definitions and keeps easy_sql.ron in sync with your schema metadata.
§What it does
- Generates missing
#[sql(unique_id = "...")]attributes for tables. - Updates migration metadata in
easy_sql.ron(featuremigrations). - Writes build errors to
easy_sql_logs/YYYY-MM-DD.txtwhen parsing fails.
§Example (build script)
ⓘ
use regex::Regex;
fn main() {
sql_build::build(
&[Regex::new(r"example_all\.rs").unwrap()],
&["crate::Sqlite", "crate::Postgres"],
);
}See build for details on default drivers and ignore patterns.
Functions§
- build
- Runs the easy-sql build step and panics on failure.