Search Results for

    Show / Hide Table of Contents

    Enum ArrayNullabilityMode

    Specifies how the mapping of arrays of value types behaves with respect to nullability when they are requested via an API returning an Object.

    Namespace: Npgsql
    Assembly: Npgsql.dll
    Syntax
    public enum ArrayNullabilityMode

    Fields

    Name Description
    Always

    Arrays of value types are always returned as nullable arrays (e.g. int?[]).

    Never

    Arrays of value types are always returned as non-nullable arrays (e.g. int[]). If the PostgreSQL array contains a NULL value, an exception is thrown. This is the default mode.

    PerInstance

    The type of array that gets returned is determined at runtime. Arrays of value types are returned as non-nullable arrays (e.g. int[]) if the actual instance that gets returned doesn't contain null values and as nullable arrays (e.g. int?[]) if it does.

    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2022 The Npgsql Development Team