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
//! MongoDB backend implementation
//!
//! This module provides a complete MongoDB implementation for the Reinhardt framework,
//! including connection management, query operations, and schema editing.
//!
//! # Features
//!
//! - **Connection Management**: Connection pooling, replica sets, and sharded clusters
//! - **Document Operations**: Full CRUD operations with MongoDB's native API
//! - **Schema Management**: Collection and index management
//! - **Transaction Support**: Multi-document ACID transactions (requires replica set)
//!
//! # Example
//!
//! ```rust,no_run
//! use reinhardt_db::nosql::backends::mongodb::MongoDBBackend;
//! use reinhardt_db::nosql::traits::DocumentBackend;
//! use bson::doc;
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! // Connect to MongoDB
//! let backend = MongoDBBackend::builder()
//! .url("mongodb://localhost:27017")
//! .database("myapp")
//! .max_pool_size(100)
//! .build()
//! .await?;
//!
//! // Insert a document
//! let id = backend.insert_one("users", doc! {
//! "name": "Alice",
//! "email": "alice@example.com"
//! }).await?;
//!
//! // Find the document
//! let user = backend.find_one("users", doc! { "_id": id }).await?;
//! # Ok(())
//! # }
//! ```
// Re-export for convenience
pub use ;