pub struct ScanRequest<'a> {
pub row_start: u64,
pub row_count: u64,
pub flags: u64,
pub projection: Projection<'a>,
pub filter: &'a [u8],
}Expand description
The host asking the decoder for a run of rows.
Fields§
§row_start: u64The first row wanted, counting from zero.
This is 64 bits because a row count that fits in 32 bits is a limit somebody will hit, and the whole point of the exercise is not to build limits into a format that ossifies.
row_count: u64How many rows are wanted. u64::MAX means “everything from row_start on”.
flags: u64Flags, all currently reserved and required to be zero.
projection: Projection<'a>Which columns are wanted.
filter: &'a [u8]A filter for the decoder to apply, in a form the decoder and the host have agreed on separately. Empty means no filter.
Implementations§
Source§impl<'a> ScanRequest<'a>
impl<'a> ScanRequest<'a>
Sourcepub const fn everything() -> Self
pub const fn everything() -> Self
A request for every row and every column.
Sourcepub fn decode(version: u16, p: &mut Reader<'a>) -> Result<Self>
pub fn decode(version: u16, p: &mut Reader<'a>) -> Result<Self>
Reads the record from its payload.
§Errors
Returns Error::UnsupportedVersion if the layout version is not one this build knows,
Error::Truncated if the payload ends early, or Error::Malformed if the projection is
not a whole number of column indices.
Trait Implementations§
Source§impl<'a> Clone for ScanRequest<'a>
impl<'a> Clone for ScanRequest<'a>
Source§fn clone(&self) -> ScanRequest<'a>
fn clone(&self) -> ScanRequest<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more