Table of Contents

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

months int
days int
time long

Properties

Days

Days, after time for alignment.

public int Days { get; }

Property Value

int

Months

Months and years, after time for alignment.

public int Months { get; }

Property Value

int

Time

Remaining time unit smaller than a day, in microseconds.

public long Time { get; }

Property Value

long

Methods

Equals(NpgsqlInterval)

public bool Equals(NpgsqlInterval other)

Parameters

other NpgsqlInterval

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int