Skip to main content

Crate doido_model

Crate doido_model 

Source

Re-exports§

pub use config::Config;
pub use config::DatabaseConfig;
pub use config::YamlConfig;
pub use create::create_database;
pub use environment::Environment;
pub use pool::connect;
pub use pool::connect_with_url;
pub use migration::add_column;
pub use migration::add_foreign_key;
pub use migration::add_index;
pub use migration::alter_table;
pub use migration::create_table;
pub use migration::drop_table;
pub use migration::remove_column;
pub use migration::remove_foreign_key;
pub use migration::remove_index;
pub use migration::rename_column;
pub use migration::rename_table;
pub use migration::AlterTableBuilder;
pub use migration::TableBuilder;
pub use sea_orm;
pub use sea_orm::Set;
pub use sea_orm_migration;

Modules§

config
Per-environment database configuration loaded from config/<env>.yml.
create
Database creation, backing doido db create.
environment
Runtime environment selection, driven by the DOIDO_ENV variable.
migration
Rails-style schema migration helpers.
pool
Database connections backed by the model config.
testing

Structs§

DatabaseConnection
A handle to a database — implements ConnectionTrait and TransactionTrait so it works with every query and mutation method in SeaORM.
LoggerConfig
Re-exported so config::LoggerConfig resolves; the logger config lives in doido-core alongside the logger it drives. The model layer reads it for the sql toggle (whether sea-orm logs each statement). Logging settings, deserialized from the logger section of config/<env>.yml.
SchemaManager
Helper struct for writing migration scripts in migration file

Traits§

ActiveModelTrait
The editable counterpart of a Model, used to build INSERT and UPDATE statements.
ColumnTrait
Operations and comparisons available on every entity column.
EntityTrait
The contract every SeaORM entity implements — a static description of a table plus the CRUD entry points used to query it.
ModelTrait
The interface implemented by every Model — an instance of an EntityTrait, roughly an OOP “object” whose fields are the table’s columns.
QueryFilter
Methods for adding WHERE / AND / OR conditions to a query. The entry point most code uses is filter.