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§
Macros§
- mock_
row - Constructs a sequence-free structurally valid
chopin_pg::Rowfrom literal tuple representations.
Structs§
- Logged
Executor - 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.
- Extract
Value - FromRow
- HasForeign
Key - Model
- Soft
Delete - Marker trait for models with a
deleted_attimestamp 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
INSERTround-trip.