# [WIP] sqlxgentools Little tool to generate SQLite migrations files and Rust SQLx repositories code, all from models structs. Still very much work in progress, but it can be already used in your next Rust app if you don't mind some limitations like the lack of incremental migrations and little quirks here and there. ## Getting started - [Quick start tutorial](./docs/tutorials/quick_start.md) ## Project context ### Goals - Help developers that dont use ORM and use SQLx in a Rust project with a SQLite DB. - Auto generate boilerplate repositories pattern code - Auto generate CREATE TABLE base migrations from model struct - Auto generate Up and Down migrations - Let developer have flexibility over the model definition ### Non-goals - Provide a full a ORM interface ## Included crates This project is split into 3 published crates. - [`sqlxgentools_cli`](https://crates.io/crates/sqlxgentools_cli), used to parse, generate migrations and repositories. - [`sqlxgentools_attrs`](https://crates.io/crates/sqlxgentools_attrs), provides proc macros. - [`sqlxgentools_misc`](https://crates.io/crates/sqlxgentools_misc), provides data types and traits (optional). ## Features - [x] generate migrations - [x] from scratch - [ ] incremental migration - [ ] up migration - [ ] down migration - [x] generate repositories - [x] get_all - [x] get_by_id - [x] insert - [x] insert_many - [x] custom get_by, get_many_by - [x] get_many_of (from one-to-many relations) ## Contributions Questions, remarks and contributions is very much welcomed.