CodeVetter · Repo Unpack · System map
SeaQL/sea-orm
The repository centers on a reusable Rust library, with companion tooling and independently runnable examples. Compile-time entity generation, runtime query execution, and migration execution occupy distinct boundaries. Cargo features select drivers and optional capabilities, while separate workspaces require package-specific validation.
- The root package is sea-orm 2.0.4, exposes the sea_orm library through src/lib.rs, and declares edition 2024 and Rust 1.94.0; its workspace contains the root, macros, codegen, and Arrow packages.
- src/lib.rs exports entity, query, schema, dynamic, and value APIs, re-exports database and executor APIs, and gates the rbac module behind its feature.
- DatabaseConnection wraps DatabaseConnectionType, whose feature-gated variants hold SQLx pools, a rusqlite shared connection, mock or proxy connections, or a disconnected sentinel.
- The async storage integration uses SeaQuery for dialect-specific statements and optional SQLx 0.9 dependencies; default features enable derives and common value types but do not select a SQLx driver or runtime.
- sea-orm-macros supplies entity, model, relation, value, and query-result derives; sea-orm-codegen converts discovered table statements into entities and generated Rust files.
- The CLI is a separate workspace with sea and sea-orm-cli binaries sharing src/bin/main.rs; migration binaries call sea_orm_migration::cli::run_cli with an application-defined migrator.
- sea-orm-sync is a separate package and workspace exposing the same sea_orm library name, depending on sea-query-rusqlite; make-sync.sh derives its source and tests from the async tree by removing async constructs.
- Distribution includes Rust library packages and tagged CLI binaries for Linux x86_64/aarch64, macOS aarch64, and Windows x86_64; CI defines workspace tests plus separate CLI and migration checks.