We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f898c2e commit 5bc7d0eCopy full SHA for 5bc7d0e
tokio-postgres/src/row.rs
@@ -204,6 +204,11 @@ impl Row {
204
Err(Error::from_sql(Box::new(WrongFormat {}), idx))
205
}
206
207
+
208
+ /// Row byte size
209
+ pub fn body_len(&self) -> usize {
210
+ self.body.buffer().len()
211
+ }
212
213
214
impl AsName for SimpleColumn {
tokio-postgres/tests/test/main.rs
@@ -277,6 +277,7 @@ async fn query_raw_txt() {
277
278
assert_eq!(rows.len(), 1);
279
assert_eq!(rows[0].get::<_, &str>(0), "42");
280
+ assert!(rows[0].body_len() > 0);
281
282
283
#[tokio::test]
0 commit comments