ts_elem_to_row() 函数

ts_elem_to_row() 函数将时间系列元素转换为新行。

语法

MI_ROW * 
ts_elem_to_row(ts_tsdesc  *tsdesc, 
                   ts_tselem  elem, 
                mi_integer off)
tsdesc
ts_open() 返回的时间系列的描述符。
elem
时间系列元素。它的类型必须与 tsdesc 描述的时间系列相匹配。
off
如果时间系列是规则的,并且 off 为非负值,那么将使用 off 来计算放入所返回行的第一列中的时间戳记值。

如果时间系列是规则的,并且 off 为负值,那么将从 elem 参数的列 0 获取结果行的列 0(如果元素是从规则时间系列创建或抽取的,那么 elem 参数将为 NULL)。

如果时间系列不规则,那么将忽略 off 参数。

返回结果

一个行。该行必须由调用者使用 mi_row_free() 过程释放。