aurora_db/
lib.rs

1//! # Aurora Database
2//!
3//! Aurora is an embedded document database with tiered storage architecture.
4//! It provides document storage, querying, indexing, and search capabilities
5//! while optimizing for both performance and durability.
6//!
7//! ## Key Features
8//!
9//! * **Tiered Storage**: Hot in-memory cache + persistent cold storage
10//! * **Document Model**: Schema-flexible JSON-like document storage
11//! * **Querying**: Rich query capabilities with filtering and sorting
12//! * **Full-text Search**: Built-in search engine with relevance ranking
13//! * **Transactions**: ACID-compliant transaction support
14//!
15//! ## Quick Start
16//!
17//! ```
18//! use aurora_db::{Aurora, Value, FieldType};
19//!
20//! // Open a database
21//! let db = Aurora::open("my_app.db")?;
22//!
23//! // Create a collection
24//! db.new_collection("users", vec![
25//!     ("name", FieldType::String, false),
26//!     ("email", FieldType::String, true),  // unique field
27//!     ("age", FieldType::Int, false),
28//! ])?;
29//!
30//! // Insert data
31//! let user_id = db.insert_into("users", vec![
32//!     ("name", "Jane Doe"),
33//!     ("email", "jane@example.com"),
34//!     ("age", 28),
35//! ])?;
36//!
37//! // Query data
38//! let users = db.query("users")
39//!     .filter(|f| f.gt("age", 21))
40//!     .collect()
41//!     .await?;
42//! ```
43
44// Re-export primary types and modules
45pub use crate::db::Aurora;
46pub use crate::db::DataInfo;
47pub use crate::error::{AuroraError, Result};
48pub use crate::query::{FilterBuilder, QueryBuilder, SearchBuilder};
49pub use types::{
50    AuroraConfig, ColdStoreMode, Collection, Document, FieldDefinition, FieldType, Value,
51};
52
53// Re-export query module for direct access to query API
54pub mod query;
55
56// Module declarations
57pub mod client;
58pub mod db;
59pub mod error;
60pub mod index;
61pub mod network;
62pub mod search;
63pub mod storage;
64pub mod types;
65pub mod wal;