Skip to main content

oxgraph_postgres/
lib.rs

1//! Postgres-backed [`OxGraph`] engine library.
2//!
3//! Owns catalog modeling, relational build into OXGTOPO snapshots, artifact I/O,
4//! active engine state, overlays, sync replay, and query algorithms. SPI, triggers,
5//! and SQL facades live in `oxgraph-pgrx`.
6#![cfg(feature = "std")]
7
8extern crate alloc;
9
10mod artifact;
11mod build;
12mod builder;
13mod catalog;
14mod config;
15mod engine;
16mod error;
17mod overlay;
18mod rebuild;
19mod role;
20mod search;
21mod status;
22mod sync;
23mod topology;
24mod traverse;
25
26pub use artifact::{
27    PostgresMetadata, PostgresSectionError, SNAPSHOT_KIND_PG_CATALOG,
28    SNAPSHOT_KIND_PG_INBOUND_OFFSETS_BASE, SNAPSHOT_KIND_PG_INBOUND_OFFSETS_U32,
29    SNAPSHOT_KIND_PG_INBOUND_TARGETS_BASE, SNAPSHOT_KIND_PG_INBOUND_TARGETS_U32,
30    SNAPSHOT_KIND_PG_METADATA, attach_metadata, attach_postgres_sections, load_snapshot_bytes,
31    read_metadata, validate_snapshot_bytes, write_snapshot_bytes,
32};
33pub use build::{
34    BuildEstimate, DualTopologySnapshot, EdgeRow, dense_node_map_from_edges, edge_row_from_scan,
35    estimate_build,
36};
37pub use builder::EngineBuilder;
38pub use catalog::{
39    Catalog, CatalogError, EdgeId, FilterColumn, NodeKey, RegisteredEdge, RegisteredTable, TableId,
40    edge_id_from_i32, table_id_from_i32, validate_primary_key, validate_sql_ident,
41};
42pub use config::{Config, QueryFreshness};
43pub use engine::{Engine, EngineStatus};
44pub use error::{BuildError, ConfigError, PostgresGraphError, QueryError, SyncError};
45pub use overlay::{OverlayEdge, OverlayState};
46pub use oxgraph_csc::{CscNodeId, CscSnapshotError, CscSnapshotGraph};
47pub use rebuild::SnapshotRebuild;
48pub use role::GraphRole;
49pub use search::SearchPredicate;
50pub use status::{EngineStatusReport, SyncHealthReport};
51pub use sync::{
52    RawSyncRow, SyncAction, SyncActionCodec, SyncActionWire, SyncHealth, SyncRow,
53    dense_node_map_for_sync_resolution, resolve_sync_action, resolve_sync_rows,
54};
55pub use topology::{ForwardCsr, GraphTopology, InboundCsc};
56pub use traverse::{TraversalDirection, TraverseLimits};
57
58#[cfg(feature = "bench-fixture")]
59pub mod bench_fixture;
60
61#[cfg(kani)]
62mod proofs;