Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTooBig = errors.New("interval overflows time.Duration")
ErrTooBig is returned by Interval.Duration and Duration.Scan if the interval would overflow a time.Duration.
Functions ¶
This section is empty.
Types ¶
type Duration ¶
Duration is a time.Duration alias that supports the driver.Valuer and sql.Scanner interfaces.
type Interval ¶
type Interval struct {
// contains filtered or unexported fields
}
Interval can represent the full range of PostgreSQL's interval type.
func (Interval) Duration ¶
Duration converts an Interval into a time.Duration with the same semantics as `EXTRACT(EPOCH from <interval>)` in PostgreSQL.
func (Interval) Microseconds ¶
Microseconds returns the number of microseconds in the interval, up to the number of microseconds in an hour.
Click to show internal directories.
Click to hide internal directories.