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
//! # Kivis Database
//!
//! A lightweight, type-safe database schema library for Rust with support for custom storage backends,
//! automatic indexing, and foreign key relationships.
//!
//! ## Features
//!
//! - **Type-safe schema generation**: Automatically derive database schemas from Rust structs
//! - **Generic storage backend support**: Work with any ordered key-value store
//! - **Automatic key generation and indexing**: Support for auto-increment keys and secondary indexes
//! - **Foreign key relationships**: Type-safe references between records
//! - **Layered cache architectures**: Compose multiple storage implementations
//!
//! ## Quick Start
//!
//! ```rust
//! use kivis::{Database, MemoryStorage, Record, manifest};
//!
//! #[derive(Record, serde::Serialize, serde::Deserialize, Debug)]
//! struct User {
//! name: String,
//! email: String,
//! }
//!
//! // Define the manifest for the database
//! manifest![MyDatabase: User];
//!
//! # fn main() -> Result<(), kivis::DatabaseError<kivis::MemoryStorageError>> {
//! let mut db = Database::<MemoryStorage, MyDatabase>::new(MemoryStorage::new());
//! let user = User {
//! name: "Alice".to_string(),
//! email: "alice@example.com".to_string(),
//! };
//! let user_key = db.put(user)?;
//! # Ok(())
//! # }
//! ```
pub use ;
pub use Database;
pub use Record;
pub use *;
pub use paste;
pub use *;
pub use crate;
// Database transaction is only usefull if atomic storage is enabled.
pub use DatabaseTransaction;