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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! Collections and documents for schemaless data storage.
//!
//! This module provides the core document storage abstraction in Nitrite.
//! Collections store unstructured documents and support flexible querying, indexing, and updates.
//!
//! # Documents
//!
//! A `Document` is a key-value map where keys are strings and values are `Value` objects.
//! Documents support nested fields using a configurable separator (default: ".").
//!
//! ```rust,ignore
//! use nitrite::collection::Document;
//!
//! let mut doc = Document::new();
//! doc.put("name", "Alice")?;
//! doc.put("address.city", "New York")?;
//! doc.put("age", 30i64)?;
//! ```
//!
//! # Collections
//!
//! A `NitriteCollection` manages documents with the same logical type. Collections support:
//! - Insert, update, remove operations
//! - Flexible querying with filters
//! - Automatic and manual indexing
//! - Event listeners for change notifications
//!
//! ```rust,ignore
//! use nitrite::collection::Document;
//! use nitrite::filter::field;
//!
//! let mut users = db.collection("users")?;
//!
//! // Insert
//! let mut doc = Document::new();
//! doc.put("name", "Alice")?;
//! let result = users.insert(doc)?;
//!
//! // Query
//! let filter = field("age").eq(30);
//! let results = users.find(filter)?;
//! ```
//!
//! # Document IDs
//!
//! Each document has a unique `_id` field containing a `NitriteId`. The ID is automatically
//! generated using a Snowflake algorithm if not provided during insertion.
//!
//! # Reserved Fields
//!
//! The following fields are reserved and managed by Nitrite:
//! - `_id` - Document ID
//! - `_revision` - Revision number
//! - `_source` - Document source
//! - `_modified` - Last modification timestamp
pub
pub
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use NitriteId;
pub use *;