drizzle_postgres/traits/
column.rs1use drizzle_core::SQLColumn;
2
3use crate::values::PostgresValue;
4pub trait PostgresColumn<'a>: SQLColumn<'a, PostgresValue<'a>> {
5 const SERIAL: bool = false;
6 const BIGSERIAL: bool = false;
7 const GENERATED_IDENTITY: bool = false;
8 const IDENTITY_ALWAYS: bool = true;
11}
12
13impl<'a, T> PostgresColumn<'a> for &T
14where
15 T: PostgresColumn<'a>,
16 for<'r> &'r T: SQLColumn<'a, PostgresValue<'a>>,
17{
18 const SERIAL: bool = T::SERIAL;
19 const BIGSERIAL: bool = T::BIGSERIAL;
20 const GENERATED_IDENTITY: bool = T::GENERATED_IDENTITY;
21 const IDENTITY_ALWAYS: bool = T::IDENTITY_ALWAYS;
22}