use alloc::string::String;
use chrono::{DateTime, NaiveDate, Utc};
use super::numeric::Numeric;
#[diagnostic::on_unimplemented(
message = "`{Self}` can not be a key column",
label = "a key can not be nullable (Option), an array (Vec), JSON or a float",
note = "use a non-null scalar for the key: an integer, bool, String, Numeric, a date or a timestamp"
)]
pub trait KeyField {}
macro_rules! key_field {
($($t:ty),*) => {$(
impl KeyField for $t {}
)*};
}
key_field!(
i8,
i16,
i32,
i64,
u8,
u16,
u32,
bool,
String,
NaiveDate,
DateTime<Utc>
);
impl<const P: u8, const S: u8> KeyField for Numeric<P, S> {}