MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / Next

Method Next

pkg/sql/sem/tree/datum.go:1852–1866  ·  view source on GitHub ↗

Next implements the Datum interface.

(_ *EvalContext)

Source from the content-addressed store, hash-verified

1850
1851// Next implements the Datum interface.
1852func (d *DDate) Next(_ *EvalContext) (Datum, bool) {
1853 switch d.Date {
1854 case pgdate.NegInfDate:
1855 return dLowDate, true
1856 case pgdate.HighDate:
1857 return dMaxDate, true
1858 case pgdate.PosInfDate:
1859 return nil, false
1860 }
1861 n, err := d.AddDays(1)
1862 if err != nil {
1863 return nil, false
1864 }
1865 return NewDDate(n), true
1866}
1867
1868// IsMax implements the Datum interface.
1869func (d *DDate) IsMax(_ *EvalContext) bool {

Callers

nothing calls this directly

Calls 2

NewDDateFunction · 0.85
AddDaysMethod · 0.80

Tested by

no test coverage detected