use super::lookup::LookupValue;
use serde::{Deserialize, Serialize};
pub trait Comparable:
Clone + Serialize + for<'de> Deserialize<'de> + Send + Sync + Into<LookupValue>
{
}
pub trait StringType: Comparable {}
pub trait NumericType: Comparable {}
pub trait DateTimeType: Comparable {}
impl Comparable for String {}
impl Comparable for i32 {}
impl Comparable for i64 {}
impl Comparable for f32 {}
impl Comparable for f64 {}
impl Comparable for bool {}
impl StringType for String {}
impl NumericType for i32 {}
impl NumericType for i64 {}
impl NumericType for f32 {}
impl NumericType for f64 {}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
pub struct DateTime {
pub timestamp: i64,
}
impl Comparable for DateTime {}
impl DateTimeType for DateTime {}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
pub struct Date {
pub year: i32,
pub month: u8,
pub day: u8,
}
impl Comparable for Date {}
impl Comparable for chrono::NaiveDateTime {}
impl DateTimeType for chrono::NaiveDateTime {}
impl Comparable for chrono::NaiveDate {}
impl DateTimeType for chrono::NaiveDate {}
impl Comparable for chrono::NaiveTime {}
impl Comparable for chrono::DateTime<chrono::Utc> {}
impl DateTimeType for chrono::DateTime<chrono::Utc> {}
impl Comparable for chrono::DateTime<chrono::FixedOffset> {}
impl DateTimeType for chrono::DateTime<chrono::FixedOffset> {}
impl Comparable for chrono::DateTime<chrono::Local> {}
impl DateTimeType for chrono::DateTime<chrono::Local> {}