本文整理汇总了Golang中github.com/influxdata/influxdb/influxql.IteratorOptions.SeekTime方法的典型用法代码示例。如果您正苦于以下问题:Golang IteratorOptions.SeekTime方法的具体用法?Golang IteratorOptions.SeekTime怎么用?Golang IteratorOptions.SeekTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/influxdata/influxdb/influxql.IteratorOptions
的用法示例。
在下文中一共展示了IteratorOptions.SeekTime方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: TestIteratorOptions_SeekTime_Descending
func TestIteratorOptions_SeekTime_Descending(t *testing.T) {
opt := influxql.IteratorOptions{
StartTime: 30,
EndTime: 60,
Ascending: false,
}
time := opt.SeekTime()
if time != 60 {
t.Errorf("expected time to be 60, got %d", time)
}
}
示例2: buildBooleanCursor
// buildBooleanCursor creates a cursor for a boolean field.
func (e *Engine) buildBooleanCursor(measurement, seriesKey, field string, opt influxql.IteratorOptions) booleanCursor {
cacheValues := e.Cache.Values(SeriesFieldKey(seriesKey, field))
keyCursor := e.KeyCursor(SeriesFieldKey(seriesKey, field), opt.SeekTime(), opt.Ascending)
return newBooleanCursor(opt.SeekTime(), opt.Ascending, cacheValues, keyCursor)
}
示例3: buildIntegerCursor
// buildIntegerCursor creates a cursor for an integer field.
func (e *Engine) buildIntegerCursor(measurement, seriesKey, field string, opt influxql.IteratorOptions) integerCursor {
cacheValues := e.Cache.Values(SeriesFieldKey(seriesKey, field))
keyCursor := e.KeyCursor(SeriesFieldKey(seriesKey, field), time.Unix(0, opt.SeekTime()).UTC(), opt.Ascending)
return newIntegerCursor(opt.SeekTime(), opt.Ascending, cacheValues, keyCursor)
}