Skip to content

Commit e62854a

Browse files
committed
Add some methods to Row
1 parent a8717d2 commit e62854a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

postgres-tokio/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,14 @@ pub struct Row {
682682
}
683683

684684
impl Row {
685+
pub fn columns(&self) -> &[Column] {
686+
&self.columns
687+
}
688+
689+
pub fn len(&self) -> usize {
690+
self.columns.len()
691+
}
692+
685693
pub fn get<T, I>(&self, idx: I) -> T
686694
where T: FromSql,
687695
I: RowIndex + fmt::Debug

0 commit comments

Comments
 (0)