Search Results for

    Show / Hide Table of Contents

    Struct NpgsqlInterval

    A raw representation of the PostgreSQL interval datatype. Use only when or NodaTime Period do not have sufficient range to handle your values.

    Implements
    IEquatable<><NpgsqlInterval>
    Namespace: NpgsqlTypes
    Assembly: Npgsql.dll
    Syntax
    public readonly struct NpgsqlInterval : IEquatable<NpgsqlInterval>
    Remarks

    See https://www.postgresql.org/docs/current/static/datatype-geometric.html.

    Do not use this type unless you have to: prefer or NodaTime Period when possible.

    Constructors

    | Improve this Doc View Source

    NpgsqlInterval(int, int, long)

    Constructs an NpgsqlInterval.

    Declaration
    public NpgsqlInterval(int months, int days, long time)
    Parameters
    Type Name Description
    int months
    int days
    long time
    Remarks

    See https://www.postgresql.org/docs/current/static/datatype-geometric.html.

    Do not use this type unless you have to: prefer or NodaTime Period when possible.

    Properties

    | Improve this Doc View Source

    Days

    Days, after time for alignment.

    Declaration
    public int Days { get; }
    Property Value
    Type Description
    int
    Remarks

    See https://www.postgresql.org/docs/current/static/datatype-geometric.html.

    Do not use this type unless you have to: prefer or NodaTime Period when possible.

    | Improve this Doc View Source

    Months

    Months and years, after time for alignment.

    Declaration
    public int Months { get; }
    Property Value
    Type Description
    int
    Remarks

    See https://www.postgresql.org/docs/current/static/datatype-geometric.html.

    Do not use this type unless you have to: prefer or NodaTime Period when possible.

    | Improve this Doc View Source

    Time

    Remaining time unit smaller than a day, in microseconds.

    Declaration
    public long Time { get; }
    Property Value
    Type Description
    long
    Remarks

    See https://www.postgresql.org/docs/current/static/datatype-geometric.html.

    Do not use this type unless you have to: prefer or NodaTime Period when possible.

    Methods

    | Improve this Doc View Source

    Equals(NpgsqlInterval)

    Declaration
    public bool Equals(NpgsqlInterval other)
    Parameters
    Type Name Description
    NpgsqlInterval other
    Returns
    Type Description
    bool
    Remarks

    See https://www.postgresql.org/docs/current/static/datatype-geometric.html.

    Do not use this type unless you have to: prefer or NodaTime Period when possible.

    | Improve this Doc View Source

    Equals(object?)

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

    See https://www.postgresql.org/docs/current/static/datatype-geometric.html.

    Do not use this type unless you have to: prefer or NodaTime Period when possible.

    | Improve this Doc View Source

    GetHashCode()

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

    See https://www.postgresql.org/docs/current/static/datatype-geometric.html.

    Do not use this type unless you have to: prefer or NodaTime Period when possible.

    Implements

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