Skip to main content

Crate dbmd_core

Crate dbmd_core 

Source
Expand description

dbmd-core — the reference library for db.md, the open database in plain files.

db.md is one directory: raw evidence in sources/, atomic typed data in records/, curator-synthesized narrative in wiki/, and a single DB.md config file at the root. Records are markdown files with YAML frontmatter; relationships are wiki-links; the index is the derived, write-through index.md / index.jsonl catalog plus embedded ripgrep.

This crate owns all toolkit logic. The dbmd binary (dbmd-cli) is a thin wrapper that parses args, calls into here, and formats output. Any Rust tool wanting to be db.md-aware can cargo add dbmd-core and get the full library — the same shape as ripgrep, where the grep/ignore libs do the work and rg is a thin CLI.

§Hard invariants this crate is built to uphold

Re-exports§

pub use extract::ExtractError;
pub use extract::Extracted;
pub use extract::Format;
pub use extract::MetaValue;
pub use graph::ContextSlice;
pub use index::Index;
pub use index::IndexLevel;
pub use index::IndexRecord;
pub use log::Log;
pub use log::LogEntry;
pub use log::LogKind;
pub use parser::Config;
pub use parser::FieldSpec;
pub use parser::Frontmatter;
pub use parser::ParseError;
pub use parser::Schema;
pub use parser::Section;
pub use parser::Shape;
pub use query::Query;
pub use render::Outline;
pub use render::Tree;
pub use store::infer_type_from_path;
pub use store::layer_for_type;
pub use store::Layer;
pub use store::NotAStore;
pub use store::Store;
pub use store::StoreError;
pub use time::now;
pub use validate::Issue;
pub use validate::Severity;

Modules§

extract
Document text extraction — the dbmd extract engine.
graph
graph — the wiki-link relationship layer.
index
index — the hierarchical content catalog.
log
log — the append-only, month-rotating chronological log.
parser
parser — read and write db.md markdown files.
query
query — Dataview-style filters, sidecar-backed.
render
render — data structures for the structural views, no output formatting.
stats
stats — store overview, computed on demand (a SWEEP, like du — never a maintained or precomputed cache).
store
store — walk, locate, and shard a db.md store.
summary
summary — the deterministic default-summary composer.
time
Canonical wall-clock for write-surface timestamp seeding.
validate
validate — the validation engine.

Enums§

Error
Top-level error for dbmd-core operations.

Type Aliases§

Result
Crate-wide result alias over Error.