Add some methods to Row
This commit is contained in:
parent
a8717d26aa
commit
e62854a4c2
@ -682,6 +682,14 @@ pub struct Row {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Row {
|
impl Row {
|
||||||
|
pub fn columns(&self) -> &[Column] {
|
||||||
|
&self.columns
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn len(&self) -> usize {
|
||||||
|
self.columns.len()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get<T, I>(&self, idx: I) -> T
|
pub fn get<T, I>(&self, idx: I) -> T
|
||||||
where T: FromSql,
|
where T: FromSql,
|
||||||
I: RowIndex + fmt::Debug
|
I: RowIndex + fmt::Debug
|
||||||
|
Loading…
Reference in New Issue
Block a user