Mallard
Search Results for

    Show / Hide Table of Contents

    Delegate DuckDbChunkReadingFunc<TState, TReturn>

    Encapsulates user-defined code that accesses DuckDbChunkReader and its columns/vectors.

    Namespace: Mallard
    Assembly: Mallard.dll
    Syntax
    public delegate TReturn DuckDbChunkReadingFunc<in TState, out TReturn>(in DuckDbChunkReader chunk, TState state) where TState : allows ref struct
    Parameters
    Type Name Description
    DuckDbChunkReader chunk

    Gives (temporary) access to the current chunk.

    TState state

    Arbitrary state that the user-defined code can take.

    Returns
    Type Description
    TReturn

    Whatever is desired. Typically the return value would be the result of some transformation in the chunk's data.

    Type Parameters
    Name Description
    TState

    Type of arbitrary state that the user-defined code can take. The state may be represented by a "ref struct", although it is always passed in by value so that it is impossible for the user-defined code to leak out dangling pointers to inside the current chunk (unless unsafe code is used).

    TReturn

    Arbitrary return type from the user-defined function. This type may not be a "ref struct", to prevent dangling pointers to inside the current chunk from being returned. (The presence of the return value is for convenience; even if this delegate has been defined to return void, user-defined code can still propagate results out of the function by assigning to "ref" members suitably defined
    inside TState.)

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