pub struct DuckRow(/* private fields */);Expand description
A single row from a DuckDB query result. A single row of data returned by a DuckDB query, consisting of typed values and their associated column names.
Values are accessible by column index via get_idx
or by column name via get.
Column names are shared via Arc across every row of the same result set:
cloning a DuckRow (as the iterator does internally when rewind support is
enabled) is one Arc bump, not a fresh per-row allocation of every column name.
Implementations§
Source§impl DuckRow
impl DuckRow
Sourcepub fn get(&self, name: &str) -> Option<&DuckValue>
pub fn get(&self, name: &str) -> Option<&DuckValue>
Returns a reference to the value for the given column name, or None if
no column with that name exists in this row.
The comparison is case-sensitive and matches by string value (not by pointer).
§Arguments
name- The column name to look up.
Sourcepub fn get_idx(&self, idx: usize) -> Option<&DuckValue>
pub fn get_idx(&self, idx: usize) -> Option<&DuckValue>
Returns a reference to the value at the given column index, or None if the
index is out of range.
§Arguments
idx- Zero-based column index.
Sourcepub fn column_count(&self) -> u64
pub fn column_count(&self) -> u64
Returns the number of columns in this row.