Skip to main content Crate doido_model Copy item path Source pub use config::Config ;pub use config::DatabaseConfig ;pub use config::YamlConfig ;pub use create::create_database ;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 ;association Declarative association conventions (Rails belongs_to/has_many/…). callbacks Active Record-style lifecycle callbacks. config Per-environment database configuration loaded from config/<env>.yml. create Database creation, backing doido db create. databases Multiple databases / read-write splitting (Rails connects_to database: { writing:, reading: }). enums Attribute enums with helpers (Rails enum status: { ... }). factory Test factories (FactoryBot-style): build test records with unique sequences. migrate Migration rollback helpers (Rails db:rollback STEP=n / db:migrate:redo)
over sea-orm’s MigratorTrait. migration Rails-style schema migration helpers. normalization Attribute normalization (Rails normalizes :email, with: -> { ... }). password Secure passwords and tokens (Rails has_secure_password / has_secure_token). pool Database connections backed by the model config . schema Schema dump/load (Rails db:schema:dump / db:schema:load). dump reads a
SQLite database’s table definitions; load replays them into a database. scope Named, chainable query scopes (Rails scope :published, -> { where(...) }). seeds Database seeds (Rails db:seed / db/seeds). A seed routine is an async
closure run against the connection; run_seeds executes it (the CLI’s
doido db seed calls the app’s registered seeder). serialization Model serialization helpers: as_json with only/except filtering (Rails
as_json(only:/except:)) and serialized columns (store a struct as JSON text). tasks Database task orchestration (Rails db:reset/db:setup/db:prepare),
composing the schema/seed primitives. testing transaction A transaction convenience wrapper (Rails Model.transaction do … end). validation Active Record-style validations. 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 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 .