pub struct StructVector;Expand description
Operations on STRUCT vectors (accessing child field vectors).
Implementations§
Source§impl StructVector
impl StructVector
Sourcepub unsafe fn get_child(
vector: duckdb_vector,
field_idx: usize,
) -> duckdb_vector
pub unsafe fn get_child( vector: duckdb_vector, field_idx: usize, ) -> duckdb_vector
Returns the child vector for the given field index of a STRUCT vector.
Field indices correspond to the order of fields in the STRUCT type definition.
§Safety
vectormust be a validDuckDBSTRUCT vector.field_idxmust be a valid field index (0 ≤field_idx< number of struct fields).- The returned vector is borrowed from
vectorand must not outlive it.
Sourcepub unsafe fn field_reader(
vector: duckdb_vector,
field_idx: usize,
row_count: usize,
) -> VectorReader
pub unsafe fn field_reader( vector: duckdb_vector, field_idx: usize, row_count: usize, ) -> VectorReader
Creates a VectorReader for the given field of a STRUCT vector.
§Safety
vectormust be a validDuckDBSTRUCT vector.field_idxmust be a valid field index.row_countmust match the number of rows in the parent chunk.
Sourcepub unsafe fn field_writer(
vector: duckdb_vector,
field_idx: usize,
) -> VectorWriter
pub unsafe fn field_writer( vector: duckdb_vector, field_idx: usize, ) -> VectorWriter
Creates a VectorWriter for the given field of a STRUCT vector.
§Safety
vectormust be a validDuckDBSTRUCT vector.field_idxmust be a valid field index.
Auto Trait Implementations§
impl Freeze for StructVector
impl RefUnwindSafe for StructVector
impl Send for StructVector
impl Sync for StructVector
impl Unpin for StructVector
impl UnsafeUnpin for StructVector
impl UnwindSafe for StructVector
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