1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! # GroundDB
//!
//! A schema-driven data layer that uses Markdown files as the source of truth.
//!
//! GroundDB stores data as plain Markdown files with YAML front matter, organized
//! on disk by configurable path templates. A SQLite system database keeps an index
//! for fast queries, and SQL-defined views are maintained automatically.
//!
//! ## Core concepts
//!
//! - **Collections** — folders of Markdown files, each file is a document
//! - **Schema** — a `schema.yaml` defining collections, fields, types, and views
//! - **Path templates** — map field values to filesystem paths (e.g., `posts/{status}/{date}-{title}.md`)
//! - **Views** — SQL queries over collections, maintained incrementally from the document index
//! - **System database** — a SQLite file (`_system.db`) storing the document index, view cache, and schema history
//!
//! ## Usage
//!
//! ```no_run
//! use grounddb::Store;
//!
//! let store = Store::open("data").unwrap();
//!
//! // Access a collection
//! let users = store.collection("users").unwrap();
//! let docs = users.list().unwrap();
//! ```
//!
//! For compile-time typed access, use [`grounddb-codegen`](https://crates.io/crates/grounddb-codegen)
//! to generate Rust structs from your schema.
//!
//! ## Feature highlights
//!
//! - Schema validation with enums, defaults, and required fields
//! - Referential integrity (`error`, `cascade`, `nullify`, `archive`)
//! - Auto-generated IDs (`ulid`, `uuid`, `nanoid`)
//! - Atomic file writes and batch operations with rollback
//! - Incremental boot with directory-hash change detection
pub use ;
pub use SchemaDefinition;
pub use ;
pub use Document;
pub use ViewEngine;