Streaming data into a memory table and then reading specific time range as another stream:
Creating the sample stream:
440.sine().toTable("440sine")
//or define custom retention period, by default it is 1 day
440.sine().toTable("440sine", 60.s)
Querying the data:
val table = TableRegistry.instance().byName<Sample>("440sine")
// last period
table.last(5.s)
// or time range in seconds
table.timeRange(1.s, 3.s)
// or in milliseconds and nanoseconds
table.timeRange(1000.ms, 3e9.ns)
Time markers are measured from the beginning of the stream which is 0.s
Implementation for https://github.com/WaveBeans/wavebeans/issues/35
Streaming data into a memory table and then reading specific time range as another stream:
Creating the sample stream:
Querying the data:
Time markers are measured from the beginning of the stream which is
0.s