Skip to main content

PostgresColumn

Trait PostgresColumn 

Source
pub trait PostgresColumn<'a>: SQLColumn<'a, PostgresValue<'a>> {
    const SERIAL: bool = false;
    const BIGSERIAL: bool = false;
    const GENERATED_IDENTITY: bool = false;
    const IDENTITY_ALWAYS: bool = true;
}
Expand description

A column of a PostgreSQL table, with its auto-increment settings.

Implemented by #[PostgresTable] for every column type it generates.

Provided Associated Constants§

Source

const SERIAL: bool = false

true for a serial column.

Source

const BIGSERIAL: bool = false

true for a bigserial column.

Source

const GENERATED_IDENTITY: bool = false

true for a GENERATED ... AS IDENTITY column.

Source

const IDENTITY_ALWAYS: bool = true

true = GENERATED ALWAYS AS IDENTITY, false = GENERATED BY DEFAULT AS IDENTITY. Only meaningful when GENERATED_IDENTITY is true.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, T> PostgresColumn<'a> for &T
where T: PostgresColumn<'a>, for<'r> &'r T: SQLColumn<'a, PostgresValue<'a>>,

Source§

const SERIAL: bool = T::SERIAL

Source§

const BIGSERIAL: bool = T::BIGSERIAL

Source§

const GENERATED_IDENTITY: bool = T::GENERATED_IDENTITY

Source§

const IDENTITY_ALWAYS: bool = T::IDENTITY_ALWAYS

Implementors§