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

Method Prev

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

Prev implements the Datum interface.

(_ *EvalContext)

Source from the content-addressed store, hash-verified

802
803// Prev implements the Datum interface.
804func (d *DFloat) Prev(_ *EvalContext) (Datum, bool) {
805 f := float64(*d)
806 if math.IsNaN(f) {
807 return nil, false
808 }
809 if f == math.Inf(-1) {
810 return dNaNFloat, true
811 }
812 return NewDFloat(DFloat(math.Nextafter(f, math.Inf(-1)))), true
813}
814
815// Next implements the Datum interface.
816func (d *DFloat) Next(_ *EvalContext) (Datum, bool) {

Callers

nothing calls this directly

Calls 2

NewDFloatFunction · 0.85
DFloatTypeAlias · 0.85

Tested by

no test coverage detected