drizzle_postgres/traits/
column.rs1use drizzle_core::SQLColumn;
2
3use crate::values::PostgresValue;
4pub trait PostgresColumn<'a>: SQLColumn<'a, PostgresValue<'a>> {
8 const SERIAL: bool = false;
10 const BIGSERIAL: bool = false;
12 const GENERATED_IDENTITY: bool = false;
14 const IDENTITY_ALWAYS: bool = true;
17}
18
19impl<'a, T> PostgresColumn<'a> for &T
20where
21 T: PostgresColumn<'a>,
22 for<'r> &'r T: SQLColumn<'a, PostgresValue<'a>>,
23{
24 const SERIAL: bool = T::SERIAL;
25 const BIGSERIAL: bool = T::BIGSERIAL;
26 const GENERATED_IDENTITY: bool = T::GENERATED_IDENTITY;
27 const IDENTITY_ALWAYS: bool = T::IDENTITY_ALWAYS;
28}