[wip] add cypher frontend#9
Draft
phall1 wants to merge 2 commits into
Draft
Conversation
Bootstraps the Cypher frontend integration on a new feat/cypher-frontend branch: * docs/contributor_guide/cypher-frontend/000-080: complete spec set covering overview, architecture, catalog extensions, read+write operator mapping, expression/type bridge, diagnostics, milestones, and open questions (including dependencies on cyrs upstream). * sql/cypher_catalog.sql: six new catalog tables wiring Cypher labels and rel-types onto registered pgGraph tables/edges, plus uniqueness and multi-label-set declarations. * src/cypher_facade/: module skeleton with five new pg_extern registration functions (register_label, register_label_property, register_rel_type, register_unique, allow_label_set) and a cyrs_schema::SchemaProvider impl reading the catalog via SPI. * Cargo.toml: cyrs-schema path dep against ../../cyrs (pin scheme to be revisited per docs/.../080-open-questions.md Q-UP-10). Execution path (graph.cypher(text, jsonb)) lands in M1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
cyrs 0.1.0 (crates.io; PRs #56/#58) resolved all 13 feat-request asks. Reflect that on the cypher-frontend branch: * schema_provider.rs: promote labels_compatible / label_unique_props / rel_type_unique_props from inherent stub methods to real cyrs_schema::SchemaProvider trait methods now that cyrs ships them, so cyrs-sema proves MERGE determinism and label-set compatibility upstream instead of at execution time. * 080-open-questions.md: rewrite the Upstream section as a resolved table mapping each Q-UP item to its shipped API; no Q-UP item blocks pgGraph any longer. Internal Q-IN decisions unchanged. * 070-milestones-and-tests.md: drop the "until cyrs ships" workarounds from M3 (multi-label CREATE), M4 (MERGE key extraction), and M5 (ShortestPath operator). Verified: cargo check --lib (rustc 1.95) passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pgGraph today exposes graph queries as PostgreSQL SQL functions:
For complex queries (ex multi hop patterns with predicates), cypher (& GQL) more expressive.
Adding a new function & support for
graph.cypher(text, jsonb)that:This is a draft for visibilty (the markdowns will be stripped when pr is ready).
cyrsis still in development, but has a pretty robust test suite. Also open to contributions over there