donadb-rel 0.1.1

DonaDB Relational — typed schemas, secondary indexes, and relational scans on top of DonaDB. Built for the TruthLinked blockchain.
Documentation
// donadb-rel — Relational layer for DonaDB.
//
// Architecture:
//   schema.rs      — typed field definitions, Schema, record encode/decode
//   index.rs       — IndexSpec, IndexWriter (auto-maintains index domains on write)
//   relation.rs    — RelTable: the unified read/write API (put_record, scan_where, follow_ref)
//   predicate.rs   — FieldOp enum: Eq, Gt, Lt, Gte, Lte, Prefix, In
//   error.rs       — RelError wrapping DonaDB DbError + schema/type errors
//   codec.rs       — compact binary encoding for typed field values
//
// Design principles:
//   - Zero changes to DonaDB core. donadb-rel is a pure overlay crate.
//   - Typed values are encoded to Bytes on write, decoded on read.
//     DonaDB stores opaque Bytes — it never knows about schemas.
//   - Secondary indexes live in dedicated DonaDB domains (family "rel_idx_*").
//     Index maintenance is transactional: primary + all index writes go into
//     a single WriteBatch so a crash never leaves an index inconsistent.
//   - Foreign key traversal is one shard.get() call — no join planner needed.
//   - The relational layer is additive: raw DonaDB put/get still works on
//     the same domains. Schema-aware and raw access coexist without conflict.

pub mod codec;
pub mod error;
pub mod index;
pub mod predicate;
pub mod relation;
pub mod schema;

pub use error::RelError;
pub use index::{IndexSpec, IndexWriter};
pub use predicate::{FieldOp, Predicate};
pub use relation::{RelTable, RelTableConfig};
pub use schema::{Field, FieldType, FieldValue, Record, Schema};