Skip to main content

coven_merge/
lib.rs

1//! The merge of §8, §9 and §15, as functions with no I/O.
2//!
3//! [`apply`] implements the merge proof's incremental step. Its order-free definition
4//! is checked in tests. [`recompute`] runs the three removal steps over a
5//! closed region (proofs/merge.md B9).
6//! Values are opaque to the merge. The database supplies CHECK results and
7//! unique claims after resolving references, using its own SQL semantics.
8
9mod audience_sql;
10pub use audience_sql::InvalidAudience;
11mod dependency;
12mod error;
13#[cfg(any(test, feature = "test-utils"))]
14mod history;
15mod input;
16mod sequence;
17pub use sequence::{had_read, ClaimOrder, SlotPast};
18mod removal;
19mod state;
20mod timestamp;
21
22pub use dependency::Provenance;
23pub use error::MergeError;
24#[cfg(test)]
25use history::from_writes;
26#[cfg(any(test, feature = "test-utils"))]
27pub use history::History;
28#[cfg(any(test, feature = "test-utils"))]
29pub use input::slot;
30pub use input::{
31    Audience, Change, ColumnValue, ConstraintColumns, ForeignKey, Operation, Parent, RowId, Slot,
32    SlotRange, UniqueConstraint, Write, WriteId, WriteOracle, WritePast,
33};
34pub use removal::{
35    recompute, resolve_reference, Constraints, Group, OnDelete, Reference, ReferenceValue,
36    RemovalResult, RemovalRow, RemovalView, Rule, UniqueClaim,
37};
38#[cfg(any(test, feature = "test-utils"))]
39pub use removal::{removals, FullRemovalView};
40pub use state::{
41    apply, generation_present, Cell, LostChange, LostKey, LostValue, RowState, RowUpdate,
42};
43pub use timestamp::Timestamp;
44
45#[cfg(test)]
46#[path = "lib_tests.rs"]
47mod tests;