This roadmap is focused on making orm-cxx easier to adopt as an open source C++ ORM: maintain equal backend contracts, document the public model and query interfaces, then expand expressiveness and database support deliberately.
Current State
orm-cxx provides a shared ORM with independently selected SQLite, PostgreSQL, MySQL and MariaDB adapters. Every backend defaults to disabled:
- A dedicated local C++20 aggregate-reflection layer with structural FixedString names, generated field access for aggregates with up to 128 fields, and no runtime reflection dependency.
- Named C++20 modules orm and orm.reflection as the sole public interface, with source module file sets for installed consumers and private implementation partitions.
- Closed orm::Schema<Models...> definitions, typed member-pointer mappings, and compile-time validation for model metadata and relation graphs.
- A documented portable model contract for supported scalar fields, nullable fields with std::optional<T>, table and column name mapping, default and explicit primary keys, generated integer primary keys, and one-level one-to-one relations.
- Native date, time-of-day, local datetime, UTC timestamp and UUID model/query types, with nullable values, keys, DTOs, static plans and typed migration constants. PostgreSQL and MariaDB expose all five; MySQL exposes temporal types; SQLite rejects these native types. The implementation preserves microseconds and applies backend ranges. Verification of this change in GitHub Actions remains pending. See Value types.
- Nullable one-to-one relations through std::optional<RelatedModel>, including nullable local foreign-key columns, SQL NULL inserts, joined selects, and non-joined selects that hydrate related primary-key values.
- Table creation and drop commands.
- Versioned SQL schema migrations for all four adapters, with file and embedded catalogs, immutable checksums, concurrency protection, optional undo SQL, explicit baselines and a project CLI. Transactional engines use per-migration transactions; MySQL and MariaDB retain durable markers and explicit recovery for incomplete migrations. See Schema migrations.
- Offline physical schema snapshots, reviewed snapshot diffs, explicit renames, backend SQL generation and immutable finalized migration projects.
- Full row-level CRUD operations through orm::OrmContext, including insert, select, predicate-based update, and predicate-based remove operations.
- Typed member-pointer query fields and one-level to-one paths, with compile-time model, operator, value, nullable, and write-target checks; typed collection filters/includes/mutations and removal of runtime text paths in 0.2.
- A query builder for full-model SELECT queries with predicates, ordering, DISTINCT, LIMIT, OFFSET, GROUP BY, aggregate HAVING, raw predicates, raw ordering, and bind parameters.
- Immutable select, DTO projection, update, and delete plans with typed argument slots, compile-time expression structure, and cached SQL for all four adapters; explicit conversion to the mutable query builders supports runtime clauses and raw SQL.
- A projection query builder for partial-result SELECT queries that hydrate flat DTOs through explicit field aliases.
- Immutable DTO plans through selectAs with compile-time literal projection aliases using as<"alias">; mutable builders also accept runtime aliases.
- Aggregate projection queries with count, countAll, sum, avg, min, max, GROUP BY, and aggregate HAVING predicates.
- Query examples that show full-model selects, full-model grouping, projected selects, and aggregate projection queries side by side.
- A patch-style orm::Update<T> builder for safe, filtered UPDATE statements, nullable-field updates through std::nullopt, and affected-row counts for UPDATE and DELETE.
- One-level one-to-one relation support in model metadata, inserts, select joins, related-field query paths, and write operations targeting local foreign-key columns through related primary-key paths.
- Explicit OneToMany and owning or inverse ManyToMany mappings with collection wrappers, lazy metadata target resolution, and validation for primary keys, inverse fields, junction names, and composite-key column counts.
- Backend-native junction-table DDL plus idempotent link and unlink mutations. Collection mutations never cascade-save endpoint models; junction rows use foreign keys and ON DELETE CASCADE without deleting the opposite endpoint.
- One-level Query<T>::include loading with parameter-bounded batched relation queries per included field, complete collections under parent pagination, and an explicit loaded-versus-unloaded wrapper state.
- Collection predicates through correlated any, exists, and none expressions without implicitly loading the matching collection.
- Unit and integration tests across model metadata, command rendering, query behavior, write operations, transactions, and live execution on all four adapters.
- Target-scoped CMake configuration with independent library, example, test, coverage, and dependency boundaries plus maintained GCC, Clang, coverage, MSVC, and quality presets.
- Repository-wide formatting and static-analysis policy through .clang-tidy, .cmake-format.yaml, local quality scripts, and matching GitHub Actions jobs.
- A shared Docker, Compose, and devcontainer environment with documented one-command paths for the supported Linux CI checks and an equivalent MSVC workflow.
- CI coverage for GCC, Clang, MSVC, Codecov, formatting, and static analysis.
- GitHub Actions CI matrix strategy testing all supported compiler versions (GCC 15; Clang 18, 19, 20; MSVC 19.50+) with per-version job isolation and explicit coverage on Clang 18.
- A source-level backend provider contract that centralizes backend selection, capabilities, runtime limits, session hooks, value binding, SQL dialect behavior, command generation, affected-row normalization, and driver-error translation.
- Stable backend-neutral database errors for lifecycle, capability, connection, statement, constraint, transaction, conversion, and affected-row failures.
- Reusable backend conformance configuration and tests, with all four adapters exercising the shared public behavior on their supported CI profiles.
- Independent backend build boundaries: core-only consumers omit every adapter's sources, registration and client linkage while retaining the shared ORM and SOCI core. Every one of the 16 selections has a consumer contract.
- A documented backend support matrix, portability policy, source extension contract, feature negotiation rules, and minimum CI requirements.
- Native dialect/runtime behavior and isolated live conformance for PostgreSQL 15/18, MySQL 8.4/9.7 and MariaDB 11.4/11.8/12.3, alongside SQLite.
Long Term
Package recipes and the release branch pipeline are implemented; see Package managers and releases. Initial availability in the central catalogs remains pending maintainer configuration of the submission token and acceptance by vcpkg and ConanCenter.
All four adapters exercise the backend portability contract. Continue expanding that contract only where another production backend needs it.
- Add ODBC, Oracle, Firebird, and DB2 according to user demand and maintainer capacity.
- Complete the initial vcpkg and ConanCenter submissions generated by the package release pipeline and follow their reviews through central publication.
- Consider a separate custom-converter contract for third-party types such as boost::uuids::uuid and boost::optional, and explicit application-selected representations on engines without matching native types. Built-in date/time/UUID support does not provide implicit emulation or converter hooks.
Far Future
These items are valuable, but they should not block the core ORM experience.
- Explore deeper to-one query paths beyond the current one-level contract. DTO alias validation and backend capability negotiation remain runtime concerns.
- Define and document thread-safety guarantees.
- Add structured logging hooks.
- Explore coroutine-based APIs for asynchronous or pipelined database work.
Roadmap Principles
- Prefer stable, documented behavior over broad but shallow feature coverage.
- Hold every supported backend to the same portability and verification contract.
- Add public APIs only when their behavior, error cases, and tests are clear.
- Treat documentation and examples as part of the feature, not follow-up polish.