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

Function GetStartTime

factstore/interval_tree.go:352–363  ·  view source on GitHub ↗

Helper functions for interval time extraction GetStartTime extracts the start time from an interval. Returns MinInt64 for unbounded start (negative infinity).

(interval ast.Interval)

Source from the content-addressed store, hash-verified

350// GetStartTime extracts the start time from an interval.
351// Returns MinInt64 for unbounded start (negative infinity).
352func GetStartTime(interval ast.Interval) int64 {
353 switch interval.Start.Type {
354 case ast.TimestampBound:
355 return interval.Start.Timestamp
356 case ast.NegativeInfinityBound:
357 return minInt64
358 case ast.PositiveInfinityBound:
359 return maxInt64
360 default:
361 return 0
362 }
363}
364
365// GetEndTime extracts the end time from an interval.
366// Returns MaxInt64 for unbounded end (positive infinity).

Callers 7

bindIntervalVariablesMethod · 0.92
insertMethod · 0.85
findExactMethod · 0.85
queryPointMethod · 0.85
queryRangeMethod · 0.85
containsTimestampFunction · 0.85
GetFactsDuringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected