Skip to main content

oxgraph_db/
lib.rs

1//! Standalone OxGraph-native database engine.
2//!
3//! `oxgraph-db` is a product layer above the topology substrate. It owns
4//! durable database identity, cataloged physical projections, properties,
5//! indexes, native `OxQL` execution, and embedded
6//! transaction semantics. Foundation crates remain storage- and
7//! meaning-neutral.
8#![expect(
9    clippy::redundant_pub_crate,
10    reason = "internal modules use crate visibility for sibling boundaries while staying unexported"
11)]
12
13pub(crate) mod backing;
14pub(crate) mod catalog;
15pub(crate) mod crc;
16pub(crate) mod database;
17pub(crate) mod error;
18pub(crate) mod freeze;
19pub(crate) mod id;
20pub(crate) mod index;
21pub(crate) mod lock;
22pub(crate) mod overlay;
23pub mod projection;
24pub(crate) mod query;
25pub(crate) mod read;
26pub(crate) mod schema;
27pub(crate) mod state;
28pub(crate) mod storage;
29pub(crate) mod traversal;
30pub(crate) mod typed;
31pub(crate) mod value;
32pub(crate) mod wal;
33pub(crate) mod wire;
34
35// Re-exported so `db`-only consumers can configure `Reader::personalized_pagerank`
36// without depending on `oxgraph-algo` directly.
37pub use oxgraph_algo::PageRankConfig;
38// Re-exported so consumers can build collision-free identity keys for the
39// equality indexes this engine reconciles against, without depending on
40// `oxgraph-layout-util` directly.
41pub use oxgraph_layout_util::keys::encode_composite_key;
42
43pub use crate::{
44    catalog::{
45        Catalog, GraphProjectionDefinition, HypergraphProjectionDefinition, IndexDefinition,
46        IndexEntry, LabelDefinition, ProjectionDefinition, ProjectionEntry, PropertyFamily,
47        PropertyKeyDefinition, RelationTypeDefinition, RoleDefinition,
48    },
49    database::{
50        CatalogSummary, CheckpointPolicy, CommitOutcome, Db, HypergraphPageRank, IndexProbe,
51        ReadPin, Reader, Stats, Writer,
52    },
53    error::{CatalogError, DbError, IdFamily, QueryError, StorageError, TxnError},
54    id::{
55        CheckpointGeneration, CommitSeq, ElementId, IncidenceId, IndexId, LabelId, ProjectionId,
56        PropertyKeyId, RelationId, RelationTypeId, RoleId, TransactionId,
57    },
58    query::{PreparedQuery, QueryResult, QueryRow, QueryValue},
59    read::{Element, Properties, Relation},
60    schema::{Bound, GraphProjectionSpec, HypergraphProjectionSpec, Schema},
61    state::{ElementRecord, IncidenceRecord, LabelSet, PropertySubject, RelationRecord},
62    traversal::{Direction, Subgraph, TraversedEdge, TraversedNode, Walk},
63    typed::{Assignable, Bool, EqualityIndex, Int, Key, RangeIndex, Readable, Text, ValueType},
64    value::{PropertyType, PropertyValue},
65};
66
67#[cfg(kani)]
68mod proofs;