Detailed Description
The RaimaDB Time Series API contains a set of template classes used for time series data manipulation.
Use these template classes to set up a static chain of encapsulated classes. Each class in the chain has a specific processing task and will pass the result of its processing to the next class in the chain. A chain of these classes is terminated with a dead_end class or an RDM::DB::insert_row class.
A transaction class is provided for transaction control. This class can be used to make a number of processing cycles transactional. A transaction class can only occur at the beginning of the chain.
There are three types of data elements passed between these classes:
-
Data values
The type for the value provided is required to have columns for 'time_stamp_current' and 'value_current' with appropriate types. Such a type can be generated using rdm-compile with a schema including a table similar to this:
CREATE TABLE measurement(time_stamp_current UINT64 PRIMARY KEY,value_current DOUBLE NOT NULL); -
Statistics
The type for the value provided is required to have columns for 'time_stamp_first', 'time_stamp_last', 'n', 'value_sum', and 'value_sum2' with appropriate types. Such a type can be generated using rdm-compile with a schema including a table similar to this:
CREATE TABLE stats(time_stamp_first UINT64 NOT NULL,time_stamp_last UINT64 PRIMARY KEY,n UINT64 NOT NULL,value_sum DOUBLE NOT NULL,value_sum2 DOUBLE NOT NULL); -
range
The type for the value provided is required to have columns for 'time_stamp_first', 'time_stamp_last', and 'value_range' with appropriate types. The column 'value_range' must be an array that is able to hold a static number of elements. Such a type can be generated using rdm-compile with a schema including a table similar to this:
CREATE TABLE range(value_range DOUBLE ARRAY [32] NOT NULL,time_stamp_first UINT64 NOT NULL,time_stamp_last UINT64 PRIMARY KEY);