Skip to main content

AssignmentColumnCatalog

Trait AssignmentColumnCatalog 

Source
pub trait AssignmentColumnCatalog {
    // Required methods
    fn try_describe_table(
        &self,
        table: &str,
    ) -> Result<Option<Vec<ColumnDef>>, ColumnCatalogError>;
    fn columns_declared(&self, table: &str) -> Result<bool, ColumnCatalogError>;
    fn try_column_insert_default_expr(
        &self,
        table: &str,
        column: &str,
    ) -> Result<Option<Expr>, ColumnCatalogError>;

    // Provided methods
    fn try_identity_column_sequence(
        &self,
        table: &str,
        column: &str,
    ) -> Result<Option<String>, SQLError> { ... }
    fn try_column_shape(
        &self,
        table: &str,
        column: &str,
    ) -> Result<Option<Option<ColumnShape>>, ColumnCatalogError> { ... }
}

Required Methods§

Provided Methods§

Source

fn try_identity_column_sequence( &self, table: &str, column: &str, ) -> Result<Option<String>, SQLError>

The sequence an identity DEFAULT draws from. An identity declaration with no sequence owned by it reports PostgreSQL’s error.

Source

fn try_column_shape( &self, table: &str, column: &str, ) -> Result<Option<Option<ColumnShape>>, ColumnCatalogError>

The type and generated kind of one column: None for an unknown table, and an inner None for a column the table does not declare. Every written value asks for it, so a catalog answers from the column alone. The default describes the whole table, which copies every column and resolves every default expression.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§