Skip to main content

Crate chopin_orm

Crate chopin_orm 

Source
Expand description

§chopin-orm

An easy-to-use Object-Relational Mapper (ORM) for chopin2, backed by the high-performance chopin-pg synchronous PostgreSQL driver.

Re-exports§

pub use builder::Condition;
pub use builder::QueryBuilder;
pub use error::OrmError;
pub use error::OrmResult;
pub use active_model::ActiveModel;
pub use migrations::Index;
pub use migrations::Migration;
pub use migrations::MigrationManager;
pub use migrations::MigrationStatus;
pub use mock::MockExecutor;

Modules§

active_model
builder
error
migrations
mock

Macros§

mock_row
Constructs a sequence-free structurally valid chopin_pg::Row from literal tuple representations.

Structs§

LoggedExecutor
A transparent middleware executor that intercepts queries and parameters.
PgConnection
A synchronous PostgreSQL connection with poll-based non-blocking I/O.
PgPool
A single-threaded, worker-local connection pool.
Row
A row returned from a query. Contains column descriptions and raw data.
Transaction
A database transaction wrapper that automatically rolls back on drop unless explicitly committed.

Enums§

PgError
Errors returned by chopin-pg operations.
PgValue
A PostgreSQL value that can be used as a query parameter or read from a row.

Traits§

Executor
A trait for types that can execute SQL queries and return results.
ExtractValue
FromRow
HasForeignKey
Model
SoftDelete
Marker trait for models with a deleted_at timestamp column.
ToSql
Trait for converting Rust types to PostgreSQL parameter values. Replaces the older ToParam — provides the same functionality with a more standard name and the ability to specify the OID.
Validate

Functions§

batch_insert
Batch insert a slice of models in a single INSERT round-trip.

Type Aliases§

PgResult

Derive Macros§

Model