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 with_column_metadata_with_control(
&self,
table: &str,
control: &ProductionControl<'_>,
read: &mut dyn FnMut(&[ColumnDef]) -> Result<(), SQLError>,
) -> Result<bool, SQLError> { ... }
fn columns_declared_with_control(
&self,
table: &str,
control: &ProductionControl<'_>,
) -> Result<bool, SQLError> { ... }
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§
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§
Sourcefn with_column_metadata_with_control(
&self,
table: &str,
control: &ProductionControl<'_>,
read: &mut dyn FnMut(&[ColumnDef]) -> Result<(), SQLError>,
) -> Result<bool, SQLError>
fn with_column_metadata_with_control( &self, table: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(&[ColumnDef]) -> Result<(), SQLError>, ) -> Result<bool, SQLError>
Lend one declaration generation after observing the same default/generated sequence dependencies as a full description. Call the reader exactly once for a found table and do no catalog work afterwards. Consumers inspect names, types and flags; expression consumers still request resolved expressions.
fn columns_declared_with_control( &self, table: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>
Sourcefn try_identity_column_sequence(
&self,
table: &str,
column: &str,
) -> Result<Option<String>, SQLError>
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.
Sourcefn try_column_shape(
&self,
table: &str,
column: &str,
) -> Result<Option<Option<ColumnShape>>, ColumnCatalogError>
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".