Skip to content

v2.0.0 — Reflect-Aware PostgreSQL Client

Choose a tag to compare

@g2px1 g2px1 released this 02 Nov 10:22
· 84 commits to main since this release

upq v2.0.0 — Reflect-Aware PostgreSQL Client


🚀 Key Features

1. Reflection-Based Mapping

  • New APIs: query_reflect<T>(), query_reflect_one<T>(), exec_reflect(),
    select_reflect<T>(), select_one_reflect<T>().
  • Automatic aggregate → parameter expansion ($1..$N).
  • Automatic row → struct / tuple mapping.
  • std::optional<T> ↔ NULL, containers ↔ PostgreSQL arrays.
  • Tight integration with ureflect.

2. Documentation

  • Added Reflect Integration section in results.md.
  • Updated index.md, quickstart.md, pool.md, transaction.md with reflect examples.
  • Added new milestone PgReflectSystem to roadmap.md.

3. Internal Refactor

  • Unified encoding/decoding for std::vector, std::array, and std::optional.
  • constexpr-based dispatch and refined trait detection.
  • Preserves zero-copy query pipeline semantics.

4. Backward Compatibility

  • Legacy APIs (query_awaitable, query_on, PgTransaction::query) remain untouched.
  • Reflect-aware mapping is header-only and opt-in.
  • Fully compatible with existing PgPool and PgTransaction workflows.

5. Upcoming Work

  • Full column-name-based mapping (completed in this release).
  • Binary protocol type conversion via PgTypeRegistry.
  • Benchmark and metrics subsystem (planned for 2.1+).