{"repo":"constata-eu/sqlx-models","free":true,"listed":false,"github":"https://github.com/constata-eu/sqlx-models","clone":"git clone https://github.com/constata-eu/sqlx-models.git","description":"Use rust's SQLx with postgres with none of the boilerplate.","language":"Rust","stars":16,"topics":["orm","postgresql","rust-library"],"license":null,"category":"databases-storage","readme_excerpt":"Sqlx Models ORM ActiveRecord pattern for Rust based on SQLx. Write idiomatic DB code (Postgres only). --- Installation Read the in-depth tutorial that doubles as a \"kitchen sink\" test in the examples These are just some of the time-saving, boilerplate-killing features: Model Create Query Update Delete Design principles: - Stateful: You're not supposed to be passing a connection pool around explicitly. - Your structs, your abstractions: This crate has a proc macro that creates a number of structs for different operations on a single database table. You can add any methods you want to any of these structs. Structs for the same operation in different tables implement a common trait to allow some degree of generalization across operations in these tables. - Idiomatic rather than performant: This should be easy to learn and use, even if there were performance tradeoffs. - Fallaback to SQLx: Always make it possible to fall back for custom queries and performance enhancements. - One table per query. Reinventing SQL for joining tables in the ORM is hard to debug and understand. Favour multiple single-table queries over a single multi-table one. (see previous item). - Only compile time checked queries. No chance of sql injection, no need for silly tests, at the cost of longer queries. - Only Postgres for now. Sorry about that :(","default_branch":null,"files":null,"tree":[],"storefront":"/r/constata-eu","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/constata-eu/sqlx-models/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."}