Trait paradox_typed_db::TypedRow
source · pub trait TypedRow<'a, 'b>where
'a: 'b,{
type Table: TypedTable<'a> + 'a;
// Required method
fn new(inner: Row<'a>, table: &'b Self::Table) -> Self;
// Provided method
fn get(
table: &'b Self::Table,
index_key: i32,
key: i32,
id_col: usize
) -> Option<Self>
where Self: Sized { ... }
}
Expand description
A “typed” database row
A typed row is the combination of a “raw” row from the assembly_fdb crate with the typing information given in [
TypedRow::Table`].
Required Associated Types§
sourcetype Table: TypedTable<'a> + 'a
type Table: TypedTable<'a> + 'a
The table this row belongs to
Required Methods§
Provided Methods§
sourcefn get(
table: &'b Self::Table,
index_key: i32,
key: i32,
id_col: usize
) -> Option<Self>where
Self: Sized,
fn get( table: &'b Self::Table, index_key: i32, key: i32, id_col: usize ) -> Option<Self>where Self: Sized,
Get a specific entry from the row by unique ID
The index_key
is the value of the first column, the key
is the value of the unique ID column
and the id_col
must be the “real” index of that unique ID column.