pub trait DrizzleRow {
// Required methods
fn get_column<T: FromPostgresValue>(
&self,
idx: usize,
) -> Result<T, DrizzleError>;
fn get_column_by_name<T: FromPostgresValue>(
&self,
name: &str,
) -> Result<T, DrizzleError>;
}Expand description
Trait for database rows that can extract values using FromPostgresValue.
This provides a unified interface for extracting values from database rows across different PostgreSQL drivers (postgres, tokio-postgres).
Required Methods§
Sourcefn get_column<T: FromPostgresValue>(
&self,
idx: usize,
) -> Result<T, DrizzleError>
fn get_column<T: FromPostgresValue>( &self, idx: usize, ) -> Result<T, DrizzleError>
Get a column value by index
Sourcefn get_column_by_name<T: FromPostgresValue>(
&self,
name: &str,
) -> Result<T, DrizzleError>
fn get_column_by_name<T: FromPostgresValue>( &self, name: &str, ) -> Result<T, DrizzleError>
Get a column value by name
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.