{"repo":"trevyn/turbosql","free":true,"listed":false,"github":"https://github.com/trevyn/turbosql","clone":"git clone https://github.com/trevyn/turbosql.git","description":"An easy local data persistence layer for Rust, backed by SQLite.","language":"Rust","stars":248,"topics":["sqlite","schema-migrations","sql","rust","sqlite3","database"],"license":null,"category":"databases-storage","readme_excerpt":"Turbosql An easy local data persistence layer, backed by SQLite. - Schema auto-defined by your Rust struct s - Automatic schema migrations - Super-simple basic INSERT / SELECT / UPDATE / DELETE operations - Use complex SQL if that's your jam - Validates all SQL (including user-supplied) at compile time Usage See integration test.rs or trevyn/turbo for more usage examples! Under the Hood Turbosql generates a SQLite schema and prepared queries for each struct: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;↓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto-generates and validates the schema Queries with SQL predicates are also assembled and validated at compile time. Note that SQL types vs Rust types for parameter bindings are not currently checked at compile time. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;↓ Automatic Schema Migrations At compile time, the #[derive(Turbosql)] macro runs and creates a migrations.toml file in your project root that describes the database schema. Each time you change a struct declaration and the macro is re-run (e.g. by cargo or rust-analyzer ), migration SQL statements are generated that update the database schema. These new statements are recorded in migrations.toml , and are automatically embedded in your binary. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;↓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto-generates migrations.toml When your schema changes, any new version of your binary will automatically migrate any older database file to the curren","default_branch":null,"files":null,"tree":[],"storefront":"/r/trevyn","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/trevyn/turbosql/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}