Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTooBig = errors.New("interval overflows time.Duration")
ErrTooBig - returned by Interval.Duration and Duration.Scan if the interval would overflow a time.Duration.
Functions ¶
This section is empty.
Types ¶
type Interval ¶
type Interval struct {
/**
Value is not null
*/
Valid bool
// 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.
type NullDuration ¶
NullDuration - Duration is a time.Duration alias that supports the driver.Valuer and sql.Scanner interfaces.
func (*NullDuration) Scan ¶
func (d *NullDuration) Scan(src interface{}) error
Scan implements sql.Scanner.
Click to show internal directories.
Click to hide internal directories.