Pinto
Pinto is a small, easy-to-use library for constructing SQL queries programmatically in Rust.
Databases
The library aims to generate queries compatible with PostgreSQL, MySQL, and SQLite.
Install
Add pinto
as a dependency:
[]
= "0.3"
Example
let query = select
.fields
.filter
.order_by
.build;
assert_eq!;
See included tests for additional examples.
Features
Statements
DELETE
WHERE
clause
INSERT
SELECT
- Table alias (
AS
) - Field selection
WHERE
clauseORDER BY
clauseLIMIT
andOFFSET
clause
- Table alias (
UPDATE
WHERE
clause
Roadmap
SELECT
- Table joins
License
MIT