mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-01-20 15:46:30 +00:00
24 lines
401 B
Rust
24 lines
401 B
Rust
use super::{protocol::DataRow, Pg};
|
|
use crate::row::Row;
|
|
|
|
pub struct PgRow(pub(crate) Box<DataRow>);
|
|
|
|
impl Row for PgRow {
|
|
type Backend = Pg;
|
|
|
|
#[inline]
|
|
fn is_empty(&self) -> bool {
|
|
self.0.is_empty()
|
|
}
|
|
|
|
#[inline]
|
|
fn len(&self) -> usize {
|
|
self.0.len()
|
|
}
|
|
|
|
#[inline]
|
|
fn get_raw(&self, index: usize) -> Option<&[u8]> {
|
|
self.0.get(index)
|
|
}
|
|
}
|