Expand description
Postgres-backed [OxGraph] engine library.
Owns catalog modeling, relational build into OXGTOPO snapshots, artifact I/O,
active engine state, overlays, sync replay, and query algorithms. SPI, triggers,
and SQL facades live in oxgraph-pgrx.
Structs§
- Build
Estimate - Estimated build sizes for registration UIs.
- Catalog
- In-memory catalog of registered tables, edges, and filter columns.
- Config
- Library-side operational configuration (GUC values are registered in
oxgraph-pgrx). - CscNode
Id - Dense node id in an inbound CSC view.
- CscSnapshot
Graph - Borrowed inbound adjacency (transpose-CSR / CSC layout).
- Dual
Topology Snapshot - Forward CSR plus inbound CSC snapshot bytes with Postgres metadata.
- EdgeId
- Stable identifier for a registered edge mapping.
- EdgeRow
- One edge endpoint pair supplied by a caller scanning source tables.
- Engine
- Active [
OxGraph] backend state loaded from OXGTOPO bytes. - Engine
Builder - Configures and builds a loaded
Enginefrom OXGTOPO bytes. - Engine
Status - Runtime status returned by admin/discovery surfaces.
- Engine
Status Report - Engine status JSON payload for admin surfaces.
- Filter
Column - Column used for filter/search indexing at query time.
- Forward
Csr - Outgoing adjacency — foundation CSR topology sections only.
- Graph
Topology - Both topology views borrowing the same snapshot backing.
- Inbound
Csc - Incoming adjacency — Postgres inbound CSC sections only.
- NodeKey
- External node key supplied by a registered table row.
- Overlay
Edge - Edge insertion applied on top of the frozen artifact.
- Overlay
State - Mutable overlay state for sync replay and query freshness.
- Postgres
Metadata - Fixed-layout Postgres metadata stored in snapshot section payloads.
- Registered
Edge - Registered directed edge between two node tables.
- Registered
Table - Registered node table metadata.
- Snapshot
Rebuild - Orchestrates relational snapshot rebuild from registration metadata and edge rows.
- Sync
Health - Returns a coarse health summary for sync surfaces.
- Sync
Health Report - Sync health JSON payload.
- SyncRow
- One sync log row with monotonic sequence metadata.
- TableId
- Stable identifier for a registered source table.
- Traverse
Limits - Limits for a single traverse query (result cap and optional hop bound).
Enums§
- Build
Error - Relational build or snapshot export failures.
- Catalog
Error - Catalog validation failures.
- Config
Error - Operational configuration failures.
- CscSnapshot
Error - Errors while opening inbound CSC sections from a snapshot.
- Graph
Role - Role required for graph operations.
- Postgres
Graph Error - Errors returned by the Postgres graph engine library.
- Postgres
Section Error - Errors while reading Postgres-owned snapshot sections.
- Query
Error - Query input or limit failures.
- Query
Freshness - Freshness policy when overlays and sync rows are present.
- Search
Predicate - Search predicate over dense node ids (extension hydrates external columns).
- Sync
Action - One durable sync row interpreted by the library.
- Sync
Action Codec - Persisted sync-log action type ids shared with trigger SQL.
- Sync
Action Wire - Persisted sync-log action before dense-node resolution.
- Sync
Error - Sync replay ordering failures.
- Traversal
Direction - Traversal direction matching pgGraph
directionsemantics.
Constants§
- SNAPSHOT_
KIND_ PG_ CATALOG - Section kind for serialized catalog blobs owned by Postgres.
- SNAPSHOT_
KIND_ PG_ INBOUND_ OFFSETS_ U32 - Postgres-owned inbound offsets section (
0x0201). - SNAPSHOT_
KIND_ PG_ INBOUND_ TARGETS_ U32 - Postgres-owned inbound targets section (
0x0202). - SNAPSHOT_
KIND_ PG_ METADATA - Section kind for Postgres engine metadata (
0x0200reserved range).
Functions§
- attach_
metadata - Appends or replaces the Postgres metadata section on CSR topology bytes.
- attach_
postgres_ sections - Appends or replaces Postgres-owned sections on CSR topology bytes.
- dense_
node_ map_ for_ sync_ resolution - Builds the dense node assignment used when replaying sync rows.
- dense_
node_ map_ from_ edges - Builds the dense node-id assignment used by
DualTopologySnapshot::from_edge_rows. - edge_
id_ from_ i32 - Parses a registered edge id from SPI/catalog storage.
- edge_
row_ from_ scan - Maps scanned SQL primary-key values to an
EdgeRowfor one registered edge mapping. - estimate_
build - Estimates node and edge counts for a build without exporting a snapshot.
- load_
snapshot_ bytes - Validates and borrows snapshot bytes without copying the payload region.
- read_
metadata - Reads Postgres-owned metadata from a validated snapshot.
- resolve_
sync_ action - Resolves one wire sync action into dense engine coordinates.
- resolve_
sync_ rows - Resolves persisted sync rows using the current relational edge scan.
- table_
id_ from_ i32 - Parses a registered table id from SPI/catalog storage.
- validate_
primary_ key - Validates a SQL primary-key value for
NodeKey::registered. - validate_
snapshot_ bytes - Returns owned snapshot bytes unchanged after validation.
- validate_
sql_ ident - Returns whether
identis safe for double-quoted SQL identifiers. - write_
snapshot_ bytes - Writes validated snapshot bytes suitable for BYTEA/LO persistence.
Type Aliases§
- RawSync
Row - Raw sync-log row scanned from SPI before dense resolution.