pub mod clickhouse_driver; pub mod mongo_driver; pub mod mysql; pub mod oracle_driver; pub mod postgres; pub mod redis_driver; pub mod sqlite; pub mod sqlserver; pub mod ssh_tunnel; use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct DatabaseInfo { pub name: String, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TableInfo { pub name: String, pub table_type: String, // "TABLE" or "VIEW" } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ColumnInfo { pub name: String, pub data_type: String, pub is_nullable: bool, pub column_default: Option, pub is_primary_key: bool, pub extra: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct QueryResult { pub columns: Vec, pub rows: Vec>, pub affected_rows: u64, pub execution_time_ms: u128, #[serde(default)] pub truncated: bool, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct IndexInfo { pub name: String, pub columns: Vec, pub is_unique: bool, pub is_primary: bool, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ForeignKeyInfo { pub name: String, pub column: String, pub ref_table: String, pub ref_column: String, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TriggerInfo { pub name: String, pub event: String, pub timing: String, }