MCPcopy Create free account
hub / github.com/dolthub/doltgresql / Add

Method Add

postgres/parser/duration/duration.go:491–493  ·  view source on GitHub ↗

Add returns a Duration representing a time length of d+x.

(x Duration)

Source from the content-addressed store, hash-verified

489
490// Add returns a Duration representing a time length of d+x.
491func (d Duration) Add(x Duration) Duration {
492 return MakeDuration(d.nanos+x.nanos, d.Days+x.Days, d.Months+x.Months)
493}
494
495// Sub returns a Duration representing a time length of d-x.
496func (d Duration) Sub(x Duration) Duration {

Callers 8

sqlStdToDurationFunction · 0.95
iso8601ToDurationFunction · 0.95
parseDurationFunction · 0.95
AsBigIntMethod · 0.45
EncodeBigIntMethod · 0.45
AddFunction · 0.45
DiffMicrosFunction · 0.45
AddMicrosFunction · 0.45

Calls 1

MakeDurationFunction · 0.85

Tested by

no test coverage detected