Search Results for

    Show / Hide Table of Contents

    Struct NpgsqlInterval

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

    Implements
    IEquatable<NpgsqlInterval>
    Inherited Members
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.GetType()
    Object.ReferenceEquals(Object, Object)
    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 TimeSpan or NodaTime Period when possible.

    Constructors

    NpgsqlInterval(Int32, Int32, Int64)

    Constructs an NpgsqlInterval.

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

    Properties

    Days

    Days, after time for alignment.

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

    Months

    Months and years, after time for alignment.

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

    Time

    Remaining time unit smaller than a day, in microseconds.

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

    Methods

    Equals(NpgsqlInterval)

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

    Equals(Object)

    Declaration
    public override readonly bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)

    GetHashCode()

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()

    Implements

    System.IEquatable<T>
    In This Article
    Back to top © Copyright 2022 The Npgsql Development Team