Struct NpgsqlInterval
- Namespace
- NpgsqlTypes
- Assembly
- Npgsql.dll
A raw representation of the PostgreSQL interval datatype. Use only when TimeSpan or NodaTime Period do not have sufficient range to handle your values.
public readonly struct NpgsqlInterval : IEquatable<NpgsqlInterval>
- Implements
- Inherited Members
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(int, int, long)
Constructs an NpgsqlInterval.
public NpgsqlInterval(int months, int days, long time)
Parameters
Properties
Days
Days, after time for alignment.
public int Days { get; }
Property Value
Months
Months and years, after time for alignment.
public int Months { get; }
Property Value
Time
Remaining time unit smaller than a day, in microseconds.
public long Time { get; }
Property Value
Methods
Equals(NpgsqlInterval)
public bool Equals(NpgsqlInterval other)
Parameters
other
NpgsqlInterval
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()