pub trait DrizzleRow {
// Required methods
fn get_column<T: FromSQLiteValue>(
&self,
idx: usize,
) -> Result<T, DrizzleError>;
fn get_column_by_name<T: FromSQLiteValue>(
&self,
name: &str,
) -> Result<T, DrizzleError>;
}Expand description
Trait for database rows that can extract values using FromSQLiteValue.
This provides a unified interface for extracting values from database rows across different SQLite drivers (libsql, turso).
Required Methods§
Sourcefn get_column<T: FromSQLiteValue>(&self, idx: usize) -> Result<T, DrizzleError>
fn get_column<T: FromSQLiteValue>(&self, idx: usize) -> Result<T, DrizzleError>
Get a column value by index
Sourcefn get_column_by_name<T: FromSQLiteValue>(
&self,
name: &str,
) -> Result<T, DrizzleError>
fn get_column_by_name<T: FromSQLiteValue>( &self, name: &str, ) -> Result<T, DrizzleError>
Get a column value by name (optional, not all drivers support this efficiently)
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.