Skip to main content

Crate pgorm

Crate pgorm 

Source
Expand description

§pgorm

A lightweight Postgres-only ORM for Rust.

§Features

  • SQL explicit: SQL/QueryBuilder is first-class citizen
  • Type-safe mapping: Row → Struct via FromRow trait
  • Minimal magic: Traits and macros only for boilerplate reduction
  • Safe defaults: DELETE requires WHERE, UPDATE requires SET

Re-exports§

pub use client::GenericClient;
pub use error::OrmError;
pub use error::OrmResult;
pub use query::query;
pub use row::FromRow;
pub use row::RowExt;
pub use client::PoolClient;
pub use pool::create_pool;
pub use pool::create_pool_with_config;

Modules§

client
Generic client trait for unified database access
error
Error types for pgorm
pool
Connection pool utilities
query
Lightweight query builder for hand-written SQL
row
Row mapping traits and utilities

Derive Macros§

FromRow
Derive FromRow trait for a struct.
Model
Derive Model metadata for a struct.