Skip to main content

Crate nookdb_core

Crate nookdb_core 

Source
Expand description

Nook core engine.

Pure-Rust embedded database. The JS binding lives in nookdb-napi; this crate has no NAPI dependencies and can be unit-tested without Node.

Re-exports§

pub use database::Database;
pub use error::NookError;
pub use error::NookErrorKind;
pub use storage::Entry;
pub use storage::ReadTx;
pub use storage::WriteTx;
pub use migrate::MigrationStatus;
pub use migrate::Runner;
pub use notify::ChangeOp;
pub use notify::CommitEvent;
pub use notify::CommitObserver;
pub use notify::DocChange;
pub use notify::Notifier;
pub use notify::ObserverHandle;
pub use live::EmitSink;
pub use live::LiveEngine;
pub use live::SubId;
pub use backup::backup_to_path;
pub use backup::read_backup;
pub use backup::restore_from_path;
pub use backup::write_backup;
pub use backup::BackupStats;
pub use backup::RestoreOptions;
pub use backup::RestoreStats;
pub use license_verify::verify as verify_license;
pub use license_verify::LicenseClaims;
pub use license_verify::NookLicenseError;

Modules§

backup
Portable .nbkp backup and restore.
collection
Typed CRUD/query composing validate + doc codec + index + storage.
database
Database — top-level handle owning the redb file lock.
error
Error type hierarchy for nookdb-core.
index
Single-field secondary index over a dedicated redb table.
license_verify
Offline ed25519 license-token verification utility (dormant).
live
Reactive subsystem: recompute live() queries on matching commits.
migrate
Stable migration-runner API SEAM (extension seam §6b).
notify
Post-commit notifier with a stable multi-observer seam.
query
Query-shaping options (sort / limit / offset) applied by find.
schema
Schema descriptor compilation and document validation.
storage
Read and write transaction handles wrapping redb transactions.

Structs§

IdentityCodec
Storage value-codec injection seam (extension seam §6a). Implement ValueCodec in an external crate to transform stored values (e.g. at-rest encryption) without forking or modifying nookdb-core; IdentityCodec is the default pass-through (plain JSON on disk). The free-tier default: bytes pass through unchanged → plain JSON on disk.

Traits§

ValueCodec
Storage value-codec injection seam (extension seam §6a). Implement ValueCodec in an external crate to transform stored values (e.g. at-rest encryption) without forking or modifying nookdb-core; IdentityCodec is the default pass-through (plain JSON on disk). Seam for transforming stored values at the storage read/write boundary.