Skip to content

test(orm): cover synchronous CRUD on real PostgreSQL - #107

Merged
Antruly merged 1 commit into
masterfrom
test/orm-cross-backend
Nov 27, 2026
Merged

Antruly merged 1 commit into
masterfrom
test/orm-cross-backend

Conversation

@Antruly

@Antruly Antruly commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Part of #93. Parent: #88. Follow-up to #106.

What changed

  • New tests/functional/orm_pgsql_func.cpp: real PostgreSQL synchronous ORM CRUD — BIGSERIAL id, point lookup, nullable reset, UPDATE, find_all + total, COUNT, DELETE, unique-key error, find-after-delete = NOT_FOUND.
  • Reads UVCPP_ORM_TEST_PGSQL_URL, falling back to UVCPP_DB_TEST_PGSQL_URL; no URL → exit 3 (Skipped), UVCPP_DB_TEST_REQUIRE=1 → exit 1.
  • Excluded from the target list when the PostgreSQL backend is not compiled.
  • The Ubuntu db-servers job now requires test_orm_pgsql_func registration and runs it against the existing PostgreSQL 16 service, next to the MySQL ORM test.
  • doc/ci-guide.md and doc/orm-guide.md now mark MySQL and PostgreSQL synchronous ORM CRUD as real-database-tested; ORM transactions/async/ODBC remain unverified.

Verification

Real PostgreSQL 16.15, unprivileged temporary cluster on 127.0.0.1:55432:

[orm_pgsql] checks=24 failures=0
[PASS] orm_pgsql
rc=0

ctest with URL:

1/1 Test #30: test_orm_pgsql_func ... Passed

ctest without URL:

***Skipped
The following tests did not run:
  30 - test_orm_pgsql_func (Skipped)

Strict C++11:

g++ -std=c++11 -pedantic-errors -Wall -Wextra ... -c
rc=0

Docs/CI gates:

check_docs.py       rc=0, 3/3
check_doc_lines.py  rc=0, 5/5
check_ci_layout.py  rc=0, 4 platform files / 7-row table / 16 badges

Unverified

  • ORM transactions and async on PostgreSQL: the PG test is synchronous CRUD only.
  • ORM via ODBC: no data source/driver.
  • The GitHub Actions job itself has not run yet; this PR is based on the equivalent local build with libpq and a real server.

Add orm_pgsql_func with the same exit-3 URL contract, exclude it when libpq is not compiled, and run it alongside the MySQL ORM test in the Ubuntu db-servers job. Document that MySQL and PostgreSQL synchronous CRUD are covered; ORM transactions, async and ODBC remain unverified.
@Antruly

Antruly commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

Local review before merge: 24/24 checks against a real PostgreSQL 16.15 server, target is absent when libpq is not compiled, URL-less run is ctest-Skipped, strict C++11 compiles clean, and docs/CI gates pass. ORM transactions/async and ODBC are explicitly not claimed.

@Antruly
Antruly merged commit 05c5c72 into master Nov 27, 2026
45 of 52 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.

1 participant