TSL_GetKeyContainer 函数

TSL_GetKeyContainer 函数返回针对指定主键值存储时间系列值的容器的名称。

语法

TSL_GetKeyContainer(
           handle       lvarchar,
           key_value    lvarchar)
returns varchar(128)
handle
TSL_AttachTSL_Init 函数返回的表名和列名组合。
key_value
主键值。如果主键值包含多个列,请以管道字符分隔各个值。

用法

使用 TSL_GetKeyContainer 函数以确定将指定数据装入到的容器。如果在多个会话中装入数据,可以将会话配置为装入到不同容器。必须在由 TSL_Init 函数初始化的装入器会话的上下文中运行 TSL_GetKeyContainer 函数。

返回结果

容器的名称。

示例

以下语句返回在 meter 表中与主键值为 1 的时间系列数据关联的容器名称:

EXECUTE FUNCTION TSL_GetKeyContainer('meter|readings', '1');