Mallard
Search Results for

    Show / Hide Table of Contents

    Struct DuckDbChunkReader

    Gives access to the data within a result chunk.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Mallard
    Assembly: Mallard.dll
    Syntax
    public readonly ref struct DuckDbChunkReader
    Remarks

    Access must be intermediated through this "ref struct" to ensure that pointers to memory allocated by the DuckDB native library can only be read from within a restricted scope. This "ref struct" is passed to the body of DuckDbChunkReadingFunc<TState, TReturn> and cannot be accessed outside of that body.

    "Ref structs" cannot be ported across threads, which also increases performance, by making unnecessary all thread-safety checks when accessing a chunk through methods here.

    Properties

    | Edit this page View Source

    Length

    The length (number of rows) present in this chunk.

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    GetColumnRaw<T>(int)

    Get access to the raw data for one column for all the rows represented by this chunk.

    Declaration
    public DuckDbVectorRawReader<T> GetColumnRaw<T>(int columnIndex) where T : unmanaged, allows ref struct
    Parameters
    Type Name Description
    int columnIndex

    The index of the column.

    Returns
    Type Description
    DuckDbVectorRawReader<T>

    DuckDbVectorRawReader<T> representing the data for the column.

    Type Parameters
    Name Description
    T

    The .NET type to bind the elements of the column to. This type must be what DuckDbVectorRawReader<T> accepts for the selected column.

    Exceptions
    Type Condition
    IndexOutOfRangeException

    columnIndex is out of range, or this instance is default-initialized.

    | Edit this page View Source

    GetColumn<T>(int)

    Get access to the data for one column for all the rows represented by this chunk.

    Declaration
    public DuckDbVectorReader<T> GetColumn<T>(int columnIndex)
    Parameters
    Type Name Description
    int columnIndex

    The index of the column.

    Returns
    Type Description
    DuckDbVectorReader<T>

    DuckDbVectorReader<T> representing the data for the column.

    Type Parameters
    Name Description
    T

    The .NET type to bind the elements of the column to. This type must be compatible with the actual (dynamic) type of the column in DuckDB.

    Exceptions
    Type Condition
    IndexOutOfRangeException

    columnIndex is out of range, or this instance is default-initialized.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX