Skip to main content

Crate pqb

Crate pqb 

Source
Expand description

§A PostgreSQL Query Builder

pqb is a Rust library designed to facilitate the construction of SQL queries for PostgreSQL databases. It provides a type-safe and ergonomic API to build complex queries programmatically.

§Examples

use pqb::expr::Expr;
use pqb::query::Select;

let _select = Select::new().from("tbl").expr(Expr::column("n")).to_sql();

Modules§

expr
SQL expressions.
func
SQL built-in functions.
index
Index definition and alterations statements.
query
SQL query statements.
schema
Schema definition statements.
table
Table definition and alternations statements.
types
Base types used throughout pqb.
value
Container for all SQL value types.

Structs§

SqlWriterValues
SQL writer that collects parameters for prepared statements.