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_U32, SNAPSHOT_KIND_PG_INBOUND_TARGETS_U32,
29    SNAPSHOT_KIND_PG_METADATA, attach_metadata, attach_postgres_sections, load_snapshot_bytes,
30    read_metadata, validate_snapshot_bytes, write_snapshot_bytes,
31};
32pub use build::{
33    BuildEstimate, DualTopologySnapshot, EdgeRow, dense_node_map_from_edges, edge_row_from_scan,
34    estimate_build,
35};
36pub use builder::EngineBuilder;
37pub use catalog::{
38    Catalog, CatalogError, EdgeId, FilterColumn, NodeKey, RegisteredEdge, RegisteredTable, TableId,
39    edge_id_from_i32, table_id_from_i32, validate_primary_key, validate_sql_ident,
40};
41pub use config::{Config, QueryFreshness};
42pub use engine::{Engine, EngineStatus};
43pub use error::{BuildError, ConfigError, PostgresGraphError, QueryError, SyncError};
44pub use overlay::{OverlayEdge, OverlayState};
45pub use oxgraph_csc::{CscNodeId, CscSnapshotError, CscSnapshotGraph};
46pub use rebuild::SnapshotRebuild;
47pub use role::GraphRole;
48pub use search::SearchPredicate;
49pub use status::{EngineStatusReport, SyncHealthReport};
50pub use sync::{
51    RawSyncRow, SyncAction, SyncActionCodec, SyncActionWire, SyncHealth, SyncRow,
52    dense_node_map_for_sync_resolution, resolve_sync_action, resolve_sync_rows,
53};
54pub use topology::{ForwardCsr, GraphTopology, InboundCsc};
55pub use traverse::{TraversalDirection, TraverseLimits};
56
57#[cfg(feature = "bench-fixture")]
58pub mod bench_fixture;
59
60#[cfg(kani)]
61mod proofs;