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

Function interval_pl_callable

server/functions/binary/plus.go:287–291  ·  view source on GitHub ↗

interval_pl_callable is the callable logic for the interval_pl function.

(ctx *sql.Context, _ [3]*pgtypes.DoltgresType, val1 any, val2 any)

Source from the content-addressed store, hash-verified

285
286// interval_pl_callable is the callable logic for the interval_pl function.
287func interval_pl_callable(ctx *sql.Context, _ [3]*pgtypes.DoltgresType, val1 any, val2 any) (any, error) {
288 dur1 := val1.(duration.Duration)
289 dur2 := val2.(duration.Duration)
290 return dur1.Add(dur2), nil
291}
292
293// interval_pl represents the PostgreSQL function of the same name, taking the same parameters.
294var interval_pl = framework.Function2{

Callers

nothing calls this directly

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected