The ts_make_elem_with_buf() function
The ts_make_elem_with_buf() function creates a time series element using the buffer in an existing time series element. The initial data in the element is overwritten.
Syntax
ts_tselem
ts_make_elem_with_buf(ts_tsdesc *tsdesc,
MI_DATUM *values,
mi_boolean *nulls,
mi_integer *off,
ts_tselem elem)
- tsdesc
- The descriptor for a time series returned by ts_open().
- values
- An array of data to be placed in the element. Data that is by value is placed in the array, and data that is by reference stores pointers.
- nulls
- Stores which columns in the element should be
NULL
. - off
- For a regular time series, off contains the offset of the
element on return. For an irregular time series, off is set
to -1. This argument can be
NULL
. - elem
- The time series element to be overwritten. It must agree in type
with the subtype of the time series. If this argument is
NULL
, a new element is created.
Returns
A time series element. If the elem argument
is non-null, that is returned containing the new values. If the elem argument
is NULL
, a new time series element is returned.