Search Results for

    Show / Hide Table of Contents

    Struct NpgsqlRange<T>

    Represents a PostgreSQL range type.

    Implements
    IEquatable<><NpgsqlRange<T>>
    Namespace: NpgsqlTypes
    Assembly: Npgsql.dll
    Syntax
    public readonly struct NpgsqlRange<T> : IEquatable<NpgsqlRange<T>>
    Type Parameters
    Name Description
    T

    The element type of the values in the range.

    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    Constructors

    | Improve this Doc View Source

    NpgsqlRange(T, T)

    Constructs an NpgsqlRange<T> with inclusive and definite bounds.

    Declaration
    public NpgsqlRange(T lowerBound, T upperBound)
    Parameters
    Type Name Description
    T lowerBound

    The lower bound of the range.

    T upperBound

    The upper bound of the range.

    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    | Improve this Doc View Source

    NpgsqlRange(T, bool, T, bool)

    Constructs an NpgsqlRange<T> with definite bounds.

    Declaration
    public NpgsqlRange(T lowerBound, bool lowerBoundIsInclusive, T upperBound, bool upperBoundIsInclusive)
    Parameters
    Type Name Description
    T lowerBound

    The lower bound of the range.

    bool lowerBoundIsInclusive

    True if the lower bound is is part of the range (i.e. inclusive); otherwise, false.

    T upperBound

    The upper bound of the range.

    bool upperBoundIsInclusive

    True if the upper bound is part of the range (i.e. inclusive); otherwise, false.

    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    | Improve this Doc View Source

    NpgsqlRange(T, bool, bool, T, bool, bool)

    Constructs an NpgsqlRange<T>.

    Declaration
    public NpgsqlRange(T lowerBound, bool lowerBoundIsInclusive, bool lowerBoundInfinite, T upperBound, bool upperBoundIsInclusive, bool upperBoundInfinite)
    Parameters
    Type Name Description
    T lowerBound

    The lower bound of the range.

    bool lowerBoundIsInclusive

    True if the lower bound is is part of the range (i.e. inclusive); otherwise, false.

    bool lowerBoundInfinite

    True if the lower bound is indefinite (i.e. infinite or unbounded); otherwise, false.

    T upperBound

    The upper bound of the range.

    bool upperBoundIsInclusive

    True if the upper bound is part of the range (i.e. inclusive); otherwise, false.

    bool upperBoundInfinite

    True if the upper bound is indefinite (i.e. infinite or unbounded); otherwise, false.

    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    Fields

    | Improve this Doc View Source

    Empty

    Represents the empty range. This field is read-only.

    Declaration
    public static readonly NpgsqlRange<T> Empty
    Field Value
    Type Description
    NpgsqlRange<T>
    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    Properties

    | Improve this Doc View Source

    IsEmpty

    True if the range is empty; otherwise, false.

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    bool
    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    | Improve this Doc View Source

    LowerBound

    The lower bound of the range. Only valid when LowerBoundInfinite is false.

    Declaration
    public T LowerBound { get; }
    Property Value
    Type Description
    T
    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    | Improve this Doc View Source

    LowerBoundInfinite

    True if the lower bound is indefinite (i.e. infinite or unbounded); otherwise, false.

    Declaration
    public bool LowerBoundInfinite { get; }
    Property Value
    Type Description
    bool
    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    | Improve this Doc View Source

    LowerBoundIsInclusive

    True if the lower bound is part of the range (i.e. inclusive); otherwise, false.

    Declaration
    public bool LowerBoundIsInclusive { get; }
    Property Value
    Type Description
    bool
    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    | Improve this Doc View Source

    UpperBound

    The upper bound of the range. Only valid when UpperBoundInfinite is false.

    Declaration
    public T UpperBound { get; }
    Property Value
    Type Description
    T
    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    | Improve this Doc View Source

    UpperBoundInfinite

    True if the upper bound is indefinite (i.e. infinite or unbounded); otherwise, false.

    Declaration
    public bool UpperBoundInfinite { get; }
    Property Value
    Type Description
    bool
    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    | Improve this Doc View Source

    UpperBoundIsInclusive

    True if the upper bound is part of the range (i.e. inclusive); otherwise, false.

    Declaration
    public bool UpperBoundIsInclusive { get; }
    Property Value
    Type Description
    bool
    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    Methods

    | Improve this Doc View Source

    Equals(NpgsqlRange<T>)

    Declaration
    public bool Equals(NpgsqlRange<T> other)
    Parameters
    Type Name Description
    NpgsqlRange<T> other
    Returns
    Type Description
    bool
    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    | Improve this Doc View Source

    Equals(object?)

    Declaration
    public override bool Equals(object? o)
    Parameters
    Type Name Description
    object? o
    Returns
    Type Description
    bool
    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    | Improve this Doc View Source

    Parse(string)

    Parses the well-known text representation of a PostgreSQL range type into a NpgsqlRange<T>.

    Declaration
    public static NpgsqlRange<T> Parse(string value)
    Parameters
    Type Name Description
    string value

    A PosgreSQL range type in a well-known text format.

    Returns
    Type Description
    NpgsqlRange<T>

    The NpgsqlRange<T> represented by the value.

    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    Operators

    | Improve this Doc View Source

    operator ==(NpgsqlRange<T>, NpgsqlRange<T>)

    Indicates whether the NpgsqlRange<T> on the left is equal to the NpgsqlRange<T> on the right.

    Declaration
    public static bool operator ==(NpgsqlRange<T> x, NpgsqlRange<T> y)
    Parameters
    Type Name Description
    NpgsqlRange<T> x

    The NpgsqlRange<T> on the left.

    NpgsqlRange<T> y

    The NpgsqlRange<T> on the right.

    Returns
    Type Description
    bool

    True if the NpgsqlRange<T> on the left is equal to the NpgsqlRange<T> on the right; otherwise, false.

    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    | Improve this Doc View Source

    operator !=(NpgsqlRange<T>, NpgsqlRange<T>)

    Indicates whether the NpgsqlRange<T> on the left is not equal to the NpgsqlRange<T> on the right.

    Declaration
    public static bool operator !=(NpgsqlRange<T> x, NpgsqlRange<T> y)
    Parameters
    Type Name Description
    NpgsqlRange<T> x

    The NpgsqlRange<T> on the left.

    NpgsqlRange<T> y

    The NpgsqlRange<T> on the right.

    Returns
    Type Description
    bool

    True if the NpgsqlRange<T> on the left is not equal to the NpgsqlRange<T> on the right; otherwise, false.

    Remarks

    See: https://www.postgresql.org/docs/current/static/rangetypes.html

    Implements

    IEquatable<>
    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2023 The Npgsql Development Team