pinto 0.1.0

SQL query builder
pinto-0.1.0 doesn't have any documentation.

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:

[dependencies]
pinto = "0.1"

Example

let query = query_builder::select("users")
    .fields(&["id", "name"])
    .filter("name = $1")
    .order_by("id", query_builder::Order::Asc)
    .build();
assert_eq!("SELECT id, name FROM users WHERE name = $1 ORDER BY id ASC;", query);

Features

Statements

  • SELECT
    • Table alias (AS)
    • Field selection
    • WHERE clause
    • ORDER BY clause
    • LIMIT and OFFSET clause

Roadmap

  • Table joins

License

MIT