Repository navigation
feat: virtual edges — relationships resolved live from an external SQ… - #7
Merged
Merged
Conversation
…L source Adds Ontology-Based Data Access: bind an edge TYPE to a parameterized SQL query against an external store; kg_edges synthesizes those edges on traversal instead of materializing them. Read-only, so it sidesteps the gated-write/event-log/compensation path entirely — a binding is config, the edges are a view (flagged _virtual:true). - kgrdbms/virtual.py: VirtualEdge binding model, registry (reserved _VirtualEdge nodes carried in the ontology), and resolver (sqlite + postgres drivers, parameter-bound never interpolated, credentials by dsn_env reference). - mcp_server.py: kg_virtual_edge_add / _list / _remove; kg_edges unions the virtual overlay transparently. - tests/test_virtual.py: end-to-end virtualization over a sqlite stand-in source (no live Postgres needed), edge-type/direction filtering, prop:source, dsn_env resolution, binding roundtrip. Full suite: 114 passed, 7 skipped. - README: 'Virtual edges' section; version 0.1.5 -> 0.1.6. This is the seam for a schema-graph / data-graph split: curated schema stays in a portable SQLite ontology; the populated extension is virtualized straight out of the system-of-record — no ETL, no drift. Co-Authored-By: Claude Opus 4.8 <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.
…L source
Adds Ontology-Based Data Access: bind an edge TYPE to a parameterized SQL query against an external store; kg_edges synthesizes those edges on traversal instead of materializing them. Read-only, so it sidesteps the gated-write/event-log/compensation path entirely — a binding is config, the edges are a view (flagged _virtual:true).
This is the seam for a schema-graph / data-graph split: curated schema stays in a portable SQLite ontology; the populated extension is virtualized straight out of the system-of-record — no ETL, no drift.