Interface IDuckDbVector
Common methods on the various types of "readers" for DuckDB vectors, for the benefit of generic code.
Namespace: Mallard
Assembly: Mallard.dll
Syntax
public interface IDuckDbVector
Remarks
This interface does not allow access to the element values as that obviously depends on their type. Use IDuckDbVector<T> for that functionality.
Properties
| Edit this page View SourceColumnInfo
Information about the column that this vector is part of.
Declaration
DuckDbColumnInfo ColumnInfo { get; }
Property Value
Type | Description |
---|---|
DuckDbColumnInfo |
Length
The length (number of rows) inherited from the result chunk this vector is part of.
Declaration
int Length { get; }
Property Value
Type | Description |
---|---|
int |
ValidityMask
The variable-length bit mask indicating which elements in the vector are valid (not null).
Declaration
ReadOnlySpan<ulong> ValidityMask { get; }
Property Value
Type | Description |
---|---|
ReadOnlySpan<ulong> |
Remarks
For element index i
and validity mask m
(the return value from this method),
the following expression indicates if the element is valid:
m.Length == 0 || (m[i / 64] & (1u % 64)) != 0
Methods
| Edit this page View SourceIsItemValid(int)
Return whether an element of this vector is valid (not null).
Declaration
bool IsItemValid(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the element of the vector. |
Returns
Type | Description |
---|---|
bool | True if valid (non-null), false if invalid (null). |
Exceptions
Type | Condition |
---|---|
IndexOutOfRangeException | The index is out of range for the vector. |