//! Shared Types for different Database drivers use std::any::Any; /// The Wild type is any type, until examined pub type Wild = Box; #[derive(Debug)] struct Type(pub Wild); /// Enum struct for mapping between database and Rust types #[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)] enum SQLType { Boolean(T), SmallInt(T), BigInt(T), Text(T), None, } impl SQLType { pub fn is_some(&self) -> bool { match *self { SQLType::None => false, _ => true, } } pub fn is_none(&self) -> bool { !self.is_some() } }