Skip to content

feat(postgres): add PGQ support with property graph query scenarios - #44

Merged
vistart merged 9 commits into
release/v1.0.0.dev15from
feature/property-graph-query
Jun 13, 2026
Merged

vistart merged 9 commits into
release/v1.0.0.dev15from
feature/property-graph-query

Conversation

@vistart

@vistart vistart commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds Property Graph Query (PGQ) support for the PostgreSQL backend, enabling property graph query scenarios with comprehensive expression coverage.

Changes

  • feat(postgres): Add PGQ support with property graph query scenarios
  • test(postgres): Add 19 PGQ format tests for 100% expression coverage
  • ci(postgres): Add standalone Python 3.14 / PostgreSQL 19beta1 test job

Type of change

  • feat: A new feature
  • test: Adding missing tests or correcting existing tests (for the new feature)
  • ci: Changes to our CI configuration files and scripts (if related to the new feature)

Breaking Change

  • Yes
  • No

Testing

  • I have added new tests to cover my changes.
  • All existing tests pass.

Checklist

  • My code follows the project's code style guidelines.
  • I have performed a self-review of my own code.
  • My changes generate no new warnings.

Related Commits

  • 681a63e feat(postgres): add PGQ support with property graph query scenarios
  • 2918976 test(postgres): add 19 PGQ format tests for 100% expression coverage
  • 77686e1 ci(postgres): add standalone Python 3.14 / PostgreSQL 19beta1 test job

vistart added 3 commits June 12, 2026 22:48
- Fix version regex to handle beta versions (e.g. 19beta1)
- Add PostgresPropertyGraphQueryMixin for PGQ support
- Add format tests for PGQ expressions
- Add scenario tests for real PGQ queries against PG19
- Update dialect and mixins init
Cover all expression edge cases and variants:
- anonymous vertex, invalid variable name (ValueError)
- undirected edge (NONE), table-only edge, variable-only edge
- empty MATCH path, anonymous vertex in MATCH
- GraphTableExpression alias, GraphColumn without alias
- CREATE IF NOT EXISTS, CREATE without edge tables
- VertexTable/EdgeTable with alias
- TablePropertiesClause ALL COLUMNS / NONE
- ALTER DROP VERTEX TABLES
- UnsupportedFeatureError for all TablePropertiesClause variants

Total: 33 -> 52 format tests, all passing.
PG 19 has no extensions yet, so it gets its own job without
postgres-exts service. Uses postgres:19beta1 official image.
Main test matrix (PG 9-18) unchanged.
@vistart vistart self-assigned this Jun 13, 2026
@codecov

codecov Bot commented Jun 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.67%. Comparing base (58665f3) to head (10b36a2).

Additional details and impacted files
@@                   Coverage Diff                    @@
##           release/v1.0.0.dev15      #44      +/-   ##
========================================================
+ Coverage                 71.65%   71.67%   +0.02%     
========================================================
  Files                       233      234       +1     
  Lines                     10563    10567       +4     
  Branches                   1665     1665              
========================================================
+ Hits                       7569     7574       +5     
+ Misses                     2461     2460       -1     
  Partials                    533      533              
Flag Coverage Δ
postgres-18 71.67% <100.00%> (+0.02%) ⬆️
python-3.14 71.67% <100.00%> (+0.02%) ⬆️
unittests 71.67% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud

Copy link
Copy Markdown

@vistart
vistart merged commit e4b7857 into release/v1.0.0.dev15 Jun 13, 2026
17 checks passed
vistart added a commit that referenced this pull request Jun 13, 2026
)

* feat(postgres): add PGQ support with property graph query scenarios

- Fix version regex to handle beta versions (e.g. 19beta1)
- Add PostgresPropertyGraphQueryMixin for PGQ support
- Add format tests for PGQ expressions
- Add scenario tests for real PGQ queries against PG19
- Update dialect and mixins init

* test(postgres): add 19 PGQ format tests for 100% expression coverage

Cover all expression edge cases and variants:
- anonymous vertex, invalid variable name (ValueError)
- undirected edge (NONE), table-only edge, variable-only edge
- empty MATCH path, anonymous vertex in MATCH
- GraphTableExpression alias, GraphColumn without alias
- CREATE IF NOT EXISTS, CREATE without edge tables
- VertexTable/EdgeTable with alias
- TablePropertiesClause ALL COLUMNS / NONE
- ALTER DROP VERTEX TABLES
- UnsupportedFeatureError for all TablePropertiesClause variants

Total: 33 -> 52 format tests, all passing.

* ci(postgres): add standalone Python 3.14 / PostgreSQL 19beta1 test job

PG 19 has no extensions yet, so it gets its own job without
postgres-exts service. Uses postgres:19beta1 official image.
Main test matrix (PG 9-18) unchanged.

* ci(postgres): add --scenario-parallel to PGQ test job

* fix(postgres): handle PG beta version strings without dot separator in async version parsing

* test(postgres): normalize LSN assertion to handle PG19 zero-padding

* test(postgres): fix async PGQ fixture graph name mismatch

* test(postgres): add version-aware LSN assertion for PG19 zero-padded format

* chore: add changelog fragment for PR #44
@vistart vistart mentioned this pull request Jun 15, 2026
7 of 12 tasks
vistart added a commit that referenced this pull request Jun 15, 2026
)

* feat(postgres): add PGQ support with property graph query scenarios

- Fix version regex to handle beta versions (e.g. 19beta1)
- Add PostgresPropertyGraphQueryMixin for PGQ support
- Add format tests for PGQ expressions
- Add scenario tests for real PGQ queries against PG19
- Update dialect and mixins init

* test(postgres): add 19 PGQ format tests for 100% expression coverage

Cover all expression edge cases and variants:
- anonymous vertex, invalid variable name (ValueError)
- undirected edge (NONE), table-only edge, variable-only edge
- empty MATCH path, anonymous vertex in MATCH
- GraphTableExpression alias, GraphColumn without alias
- CREATE IF NOT EXISTS, CREATE without edge tables
- VertexTable/EdgeTable with alias
- TablePropertiesClause ALL COLUMNS / NONE
- ALTER DROP VERTEX TABLES
- UnsupportedFeatureError for all TablePropertiesClause variants

Total: 33 -> 52 format tests, all passing.

* ci(postgres): add standalone Python 3.14 / PostgreSQL 19beta1 test job

PG 19 has no extensions yet, so it gets its own job without
postgres-exts service. Uses postgres:19beta1 official image.
Main test matrix (PG 9-18) unchanged.

* ci(postgres): add --scenario-parallel to PGQ test job

* fix(postgres): handle PG beta version strings without dot separator in async version parsing

* test(postgres): normalize LSN assertion to handle PG19 zero-padding

* test(postgres): fix async PGQ fixture graph name mismatch

* test(postgres): add version-aware LSN assertion for PG19 zero-padded format

* chore: add changelog fragment for PR #44
@vistart
vistart deleted the feature/property-graph-query branch October 1, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant