#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Integer;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Text;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Boolean;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Float;
pub trait SqlType: sealed::Sealed + 'static {
const SQL_KEYWORD: &'static str;
}
impl SqlType for Integer {
const SQL_KEYWORD: &'static str = "INTEGER";
}
impl SqlType for Text {
const SQL_KEYWORD: &'static str = "TEXT";
}
impl SqlType for Boolean {
const SQL_KEYWORD: &'static str = "BOOLEAN";
}
impl SqlType for Float {
const SQL_KEYWORD: &'static str = "REAL";
}
mod sealed {
pub trait Sealed {}
impl Sealed for super::Integer {}
impl Sealed for super::Text {}
impl Sealed for super::Boolean {}
impl Sealed for super::Float {}
}