Skip to content

feat odbc: make driver production-ready - #1309

Open
V0S7ER wants to merge 12 commits into
userver-framework:developfrom
V0S7ER:agent/odbc-production-ready
Open

feat odbc: make driver production-ready#1309
V0S7ER wants to merge 12 commits into
userver-framework:developfrom
V0S7ER:agent/odbc-production-ready

Conversation

@V0S7ER

@V0S7ER V0S7ER commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Closes #218.

This is a follow-up to #1161 that completes the remaining ODBC production-readiness work and addresses the maintainer feedback from that review.

What changed

  • Added secure parameterized query execution for Cluster and Transaction using ODBC ? placeholders, SQLPrepare, SQLNumParams, SQLBindParameter, and SQLExecute. The public API supports booleans, integer and floating-point types, strings, enums, optionals, and null values while keeping bound storage alive for the entire execution.
  • Exposed CommandControl as public API, merged explicit/default/inherited deadlines, removed public engine::Deadline overloads, and made network deadlines cover connection acquisition, connect, begin, and blocking statement execution.
  • Added post-call deadline checks so a driver call that completes after its deadline is reported as OperationInterrupted and accounted as a timeout.
  • Added live secdist updates without replacing the public Cluster, with serialized topology replacement, unchanged-DSN suppression, safe pool/connection lifetime, and restoration of per-pool static settings when a dynamic override disappears.
  • Added component and dynamic-config schema documentation, snippet-backed user documentation, configuration validation, an ODBC metrics smoke test, and a secdist reload functional test.
  • Incorporated the smaller review fixes from feat odbc: improve driver #1161 (StrIcaseEqual, utils::text::ToUpper, designated initializers, and safe atomic ordering).

User impact

ODBC users can pass query parameters separately from SQL text instead of formatting them into a query, configure operation timeouts through the same command-control model as other userver database drivers, reload DSNs through secdist, and rely on documented schemas and metrics.

Validation

  • ODBC PostgreSQL test suite: 69/69 passed
  • ODBC basic-chaos functional suite: 15/15 passed
  • ODBC secdist-update functional suite: 1/1 passed
  • userver-odbc and both functional services built successfully
  • component-schema and dynamic-config documentation generators passed
  • project clang-format --dry-run --Werror, git diff --check, JSON validation, and Python syntax checks passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement asynchronous driver for ODBC

1 participant