The ts_ins_elem() function
The ts_ins_elem() function puts an element into an existing time series at a given timepoint.
Syntax
ts_timeseries *
ts_ins_elem(ts_tsdesc *tsdesc,
ts_tselem tselem,
mi_datetime *tstamp)
- tsdesc
- A descriptor of the time series to be modified, returned by ts_open().
- tselem
- The element to add.
- tstamp
- The timepoint at which to add the element. The time stamp column of the tselem is ignored.
Description
The equivalent SQL function is InsElem.
Returns
The original time series with the new element added. If the time stamp is not a valid timepoint in the time series, an error is raised. If there is already an element at the given time stamp, an error is raised.