Skip to main content

Module db

Module db 

Source
Expand description

Database dialect abstraction for architect-sdk.

Package configs use canonical type names (see types::CanonicalType). Each dialect module maps those to database-specific DDL strings, SQL casts, and operator rules.

§Adding a new dialect

  1. Add a Cargo feature (e.g. mysql).
  2. Create src/db/your_dialect.rs implementing Dialect.
  3. Gate it with #[cfg(feature = "your_dialect")] below.
  4. Add it to active_dialect().
  5. Add to Cargo.toml features.

Re-exports§

pub use dialect::Dialect;
pub use introspect::introspect;
pub use introspect::ColumnFacts;
pub use introspect::DbSnapshot;
pub use types::active_cast_name;
pub use types::parse_canonical;
pub use types::type_category;
pub use types::type_category_from_cast;
pub use types::CanonicalType;
pub use types::TypeCategory;
pub use types::TypeSupport;
pub use sqlite::SqliteDialect;

Modules§

dialect
The Dialect trait — every database backend implements this.
introspect
Physical-database introspection.
pool
Feature-gated type aliases for the active database pool and connection.
sqlite
SQLite dialect implementation.
types
Database-agnostic type system for architect-sdk.

Functions§

active_dialect
Construct the compiled-in dialect as a shared reference. The dialect is determined at compile time by the active feature flag.