mod databasetree; mod databasetreeitems; mod error; mod item; mod tree_iter; mod treeitems_iter; pub use crate::{ databasetree::DatabaseTree, databasetree::MoveSelection, item::{DatabaseTreeItem, TreeItemInfo}, }; #[derive(Clone, PartialEq, Debug)] pub struct Database { pub name: String, pub children: Vec, } #[derive(Clone, PartialEq, Debug)] pub enum Child { Table(Table), Schema(Schema), } impl From for Child { fn from(t: Table) -> Self { Child::Table(t) } } impl From for Child { fn from(s: Schema) -> Self { Child::Schema(s) } } impl Database { pub fn new(database: String, children: Vec) -> Self { Self { name: database, children, } } } #[derive(Clone, PartialEq, Debug)] pub struct Schema { pub name: String, pub tables: Vec
, } #[derive(Debug, Clone, PartialEq)] pub struct Table { pub name: String, pub create_time: Option>, pub update_time: Option>, pub engine: Option, pub schema: Option, }