All Projects → jacobbudin → pinto

jacobbudin / pinto

Licence: MIT license
Query builder (SQL) in Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to pinto

rust-lcms2
ICC color profiles in Rust
Stars: ✭ 25 (+8.7%)
Mutual labels:  rust-library
e621 downloader
E621 and E926 downloader made in the Rust programming langauge.
Stars: ✭ 39 (+69.57%)
Mutual labels:  rust-library
mailparse
Rust library to parse mail files
Stars: ✭ 148 (+543.48%)
Mutual labels:  rust-library
httper
An asynchronous HTTP(S) client built on top of hyper.
Stars: ✭ 16 (-30.43%)
Mutual labels:  rust-library
laravel-query-inspector
The missing laravel helper that allows you to inspect your eloquent queries with it's bind parameters
Stars: ✭ 59 (+156.52%)
Mutual labels:  query-builder
rust-ipfs-api
Rust language IPFS API implementation
Stars: ✭ 20 (-13.04%)
Mutual labels:  rust-library
type-metadata
Rust type metadata reflection library
Stars: ✭ 27 (+17.39%)
Mutual labels:  rust-library
apollo-studio-community
🎡  GraphQL developer portal featuring an IDE (Apollo Explorer), auto-documentation, metrics reporting, and more. This repo is for issues, feature requests, and preview docs. 📬
Stars: ✭ 212 (+821.74%)
Mutual labels:  query-builder
actix-derive
[ARCHIVED] development moved into main actix repo
Stars: ✭ 38 (+65.22%)
Mutual labels:  rust-library
querie
Compose Ecto query from the client side
Stars: ✭ 20 (-13.04%)
Mutual labels:  query-builder
finny.rs
Finite State Machines for Rust
Stars: ✭ 48 (+108.7%)
Mutual labels:  rust-library
sparklis
Sparklis is a query builder in natural language that allows people to explore and query SPARQL endpoints with all the power of SPARQL and without any knowledge of SPARQL.
Stars: ✭ 28 (+21.74%)
Mutual labels:  query-builder
querqy-elasticsearch
Querqy for Elasticsearch
Stars: ✭ 37 (+60.87%)
Mutual labels:  query-builder
imgref
A trivial Rust struct for interchange of pixel buffers with width, height & stride
Stars: ✭ 45 (+95.65%)
Mutual labels:  rust-library
webbrowser-rs
Rust library to open URLs in the web browsers available on a platform
Stars: ✭ 150 (+552.17%)
Mutual labels:  rust-library
flepper
Flepper is a library to aid in database interaction. 🐸
Stars: ✭ 60 (+160.87%)
Mutual labels:  query-builder
rabe
rabe is an Attribute Based Encryption library, written in Rust
Stars: ✭ 52 (+126.09%)
Mutual labels:  rust-library
whoami
Rust crate to get the current user and environment.
Stars: ✭ 68 (+195.65%)
Mutual labels:  rust-library
cdc
A library for performing Content-Defined Chunking (CDC) on data streams.
Stars: ✭ 18 (-21.74%)
Mutual labels:  rust-library
rdp
A library providing FFI access to fast Ramer–Douglas–Peucker and Visvalingam-Whyatt line simplification algorithms
Stars: ✭ 20 (-13.04%)
Mutual labels:  rust-library

Pinto

Pinto is a small, easy-to-use library for constructing SQL queries programmatically in Rust.

⚠️ This library does not provide query parameterization. Do not use raw user-supplied data in your queries. If inputs are not properly escaped, your software will be suspectible to SQL injection attacks.

Compatibility

The library aims to generate queries compatible with PostgreSQL, MySQL, and SQLite.

Install

Add pinto as a dependency:

[dependencies]
pinto = "0.6.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);

See included tests for additional examples.

Features

Statements

  • DELETE
    • WHERE clause
  • INSERT
  • SELECT
    • Table alias (AS)
    • Field selection
    • JOIN clause
    • WHERE clause
    • GROUP BY clause
    • HAVING clause
    • ORDER BY clause
    • LIMIT and OFFSET clause
  • UPDATE
    • WHERE clause

Documentation

Design Philosophy

Pinto aims to be:

  1. Easy-to-use — the library should be useful with a beginner's knowledge of Rust
  2. Simple — the library's API should follow common SQL terminology and should allow its users to write concise, readable implementations

Other design goals, such as performance, are relevant but not foremost.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].