Query the schema as a graph via MATCH on schema_table/schema_rel - #1008
Merged
Merged
Conversation
Adds system tables schema_table (node) and schema_rel (rel) that mirror the catalog, auto-refreshed before MATCH queries, and hidden from SHOW_TABLES/:schema/wildcard MATCH/EXPORT.
adsharma
force-pushed
the
schema-as-graph
branch
from
September 21, 2026 22:44
41366f8 to
65a18be
Compare
Adds a multiplicity STRING property to schema_rel, one value per (src, dst) connection using DDL convention (MANY_MANY, MANY_ONE, ONE_ONE, ...), snapshotted from the catalog. Migrates pre-existing schema_rel tables via ALTER TABLE ADD.
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.
Fixes: #1011
Query the schema as a graph instead of only via the
:schemaCREATE-statement dump.How it works:
schema_table(node: name PK, id, type) andschema_rel(rel: name, id) mirror the catalog. Prefixed names because baretableis a reserved keyword andMATCH (a:table)is a parse error.SHOW_TABLES/:schema/wildcard MATCH/EXPORT (visible with internal catalog enabled for cleanup).Tests: new
test/test_files/schema/schema_graph.test; shell suite 14 passed; e2e ddl/match/comment/issue/schema suites passed.