MCPcopy
hub / github.com/google/mangle / resolveFutureOperatorInterval

Method resolveFutureOperatorInterval

engine/temporal.go:420–433  ·  view source on GitHub ↗

resolveFutureOperatorInterval converts a future operator interval to absolute timestamps.

(interval ast.Interval)

Source from the content-addressed store, hash-verified

418
419// resolveFutureOperatorInterval converts a future operator interval to absolute timestamps.
420func (te *TemporalEvaluator) resolveFutureOperatorInterval(interval ast.Interval) (ast.Interval, error) {
421 start, err := te.resolveBound(interval.Start, false) // false = future operator
422 if err != nil {
423 return ast.Interval{}, err
424 }
425
426 end, err := te.resolveBound(interval.End, false)
427 if err != nil {
428 return ast.Interval{}, err
429 }
430
431 // For future operators, the interval is from start to end (not swapped)
432 return ast.NewInterval(start, end), nil
433}
434
435// bindIntervalVariables binds interval variables in the query to the fact's interval.
436// Supports binding @[T] (point/variable) or @[T1, T2] (range).

Callers 2

evalDiamondPlusMethod · 0.95
evalBoxPlusMethod · 0.95

Calls 2

resolveBoundMethod · 0.95
NewIntervalFunction · 0.92

Tested by

no test coverage detected