For AI agents: the complete documentation index is available at https://a3s-lab.github.io/ORM/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/ORM/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/ORM/en/getting-started/overview.md.
  • English
  • v0.3.1
  • Overview

    A3S ORM is a type-safe Rust SQL query builder inspired by Kysely. Table declarations constrain columns, values, assignments, and decoded results while the actual SQL, bound parameters, and execution point remain visible.

    It is not an Active Record framework. Records do not own persistence methods, field access does not execute queries, and runtime values never enter SQL text.

    Core data flow

    typed tables and expressions
                |
         immutable query AST
                |
           dialect compiler
                |
         SQL + bound parameters
                |
        async Executor and driver

    Each layer owns one category of responsibility:

    LayerOwnsDoes not own
    Schema and ExpressionTable identity, column ownership, value families, legal comparisonsSQL dialects and connections
    QuerySELECT, INSERT, UPDATE, DELETE, and their structureOpening database connections
    DialectIdentifier quoting, placeholders, capability checksTransactions and row decoding
    ExecutorAsync execution, transactions, connections, and driver rowsBuilder type state
    DecodeChecked conversion from driver-neutral valuesImplicit correction of incompatible types

    Guarantees you can rely on

    • A column can only be used with its owning table or an explicit alias.
    • Comparisons, assignments, and inserted values must use compatible Rust and SQL value families.
    • Dynamic values can only enter compiled output as bound parameters.
    • Unsupported dialect capabilities return errors instead of approximate syntax.
    • CTEs, subqueries, windows, and outer queries share one parameter sequence.
    • Database separates build, execution, decoding, no-row, and too-many-row failures.

    v0.3.1 also supports typed UPDATE CTEs, UPDATE FROM, expression assignments, and atomic worker claims. Candidate row locking and state updates can remain in one parameterized statement.

    Dialects and runtimes

    CapabilityPostgreSQLSQLiteMySQL
    SQL compilationYesYesYes
    Bundled async driverYesYesNo
    RETURNINGYesYesRejected
    ON CONFLICTYesYesRejected
    Row and table locksYesRejectedRejected
    TransactionsYesYesNo
    Locked migrationsAdvisory lockBEGIN IMMEDIATENo

    SQLite is the default feature. PostgreSQL uses a bounded Deadpool pool and adds transaction policy, TLS, health snapshots, and retry classification. MySQL currently provides compilation only.

    Next steps

    Read installation and features, then complete the quick start. Review architecture and production boundaries before deployment.