Struct convergence::protocol_ext::DataRowBatch
source · pub struct DataRowBatch { /* private fields */ }
Expand description
Supports batched rows for e.g. returning portal result sets.
NB: this struct only performs limited validation of column consistency across rows.
Implementations§
source§impl DataRowBatch
impl DataRowBatch
sourcepub fn new(format_code: FormatCode, num_cols: usize) -> Self
pub fn new(format_code: FormatCode, num_cols: usize) -> Self
Creates a new row batch using the given format code, requiring a certain number of columns per row.
sourcepub fn from_row_desc(desc: &RowDescription) -> Self
pub fn from_row_desc(desc: &RowDescription) -> Self
Creates a DataRowBatch from the given RowDescription.
sourcepub fn create_row(&mut self) -> DataRowWriter<'_>
pub fn create_row(&mut self) -> DataRowWriter<'_>
Starts writing a new row.
Returns a DataRowWriter that is responsible for the actual value encoding.
Trait Implementations§
source§impl Encoder<DataRowBatch> for ConnectionCodec
impl Encoder<DataRowBatch> for ConnectionCodec
Auto Trait Implementations§
impl RefUnwindSafe for DataRowBatch
impl Send for DataRowBatch
impl Sync for DataRowBatch
impl Unpin for DataRowBatch
impl UnwindSafe for DataRowBatch
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more