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
//! MongoDB Shell Library
//!
//! This library provides the core functionality for the MongoDB Shell (mongosh) implementation.
//! It can be used as a standalone library to build MongoDB tools and applications.
//!
//! # Modules
//!
//! - `cli`: Command-line interface and argument parsing
//! - `config`: Configuration management
//! - `connection`: MongoDB connection management
//! - `error`: Error types and handling
//! - `executor`: Command execution engine
//! - `formatter`: Output formatting and display
//! - `parser`: Command and query parsing
//! - `plugins`: Plugin system for extensibility
//! - `repl`: Interactive REPL engine
//!
//! # Example
//!
//! ```no_run
//! use mongosh::{config::Config, connection::ConnectionManager};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let config = Config::default();
//! let mut manager = ConnectionManager::new(
//! "mongodb://localhost:27017".to_string(),
//! config.connection,
//! );
//!
//! manager.connect().await?;
//! println!("Connected to MongoDB");
//!
//! manager.disconnect().await?;
//! Ok(())
//! }
//! ```
// Re-export commonly used types
pub use Config;
pub use ConnectionManager;
pub use ;
pub use ;
pub use Formatter;
pub use ;
pub use ReplEngine;
/// Library version
pub const VERSION: &str = env!;
/// Get library version string
///
/// # Returns
/// * `&str` - Version string