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
//! # IC-NoSQL: A flexible NoSQL database library for Internet Computer canisters
//!
//! This library provides a comprehensive NoSQL database solution built on top of
//! IC's stable memory structures, with support for multiple models, secondary indexes,
//! flexible memory management, and type-safe operations.
//!
//! ## Features
//!
//! - **Multiple Model Support**: Register and manage different data models in a single canister
//! - **Secondary Indexes**: Optional secondary indexes for efficient querying
//! - **Memory Management**: Automatic memory allocation with conflict prevention
//! - **Type Safety**: Compile-time type checking for all database operations
//! - **Pagination**: Built-in pagination support for large result sets
//! - **Macros**: Easy model definition with the `define_model!` macro
//!
//! ## Quick Start
//!
//! ```rust
//! use ic_nosql::{DatabaseManager, CandidType, Deserialize, Serialize};
//!
//! // Define a model
//! #[derive(Debug, Clone, CandidType, Deserialize, Serialize)]
//! pub struct User {
//! pub id: String,
//! pub username: String,
//! pub email: String,
//! }
//!
//! // Initialize database manager
//! let db_manager = DatabaseManager::new();
//!
//! // Register the model
//! db_manager.register_model("users", None, None).unwrap();
//!
//! // Use the database
//! let user = User {
//! id: "1".to_string(),
//! username: "alice".to_string(),
//! email: "alice@example.com".to_string()
//! };
//!
//! db_manager.insert("users", "1", &user).unwrap();
//! let retrieved_user = db_manager.get::<User>("users", "1").unwrap();
//! ```
// Database core functionality
// Re-export core types and functionality for easy access
pub use ;
pub use ;
pub use ;
//pub use macros::define_model;
// Re-export commonly used external types
pub use ;
pub use Storable;
pub use Serialize;