This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new cce491190e [IOTDB-3056] triggers support multi-level documents (#5759)
cce491190e is described below
commit cce491190e775a80bcd9fd22fc915f4673037676
Author: gongning <[email protected]>
AuthorDate: Mon May 2 09:10:01 2022 +0800
[IOTDB-3056] triggers support multi-level documents (#5759)
Co-authored-by: wenhua.gongwh <[email protected]>
---
docs/UserGuide/Process-Data/Triggers.md | 9 +++++----
docs/zh/UserGuide/Process-Data/Triggers.md | 7 +++++--
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/docs/UserGuide/Process-Data/Triggers.md
b/docs/UserGuide/Process-Data/Triggers.md
index 2dc8d67b66..f711c0d811 100644
--- a/docs/UserGuide/Process-Data/Triggers.md
+++ b/docs/UserGuide/Process-Data/Triggers.md
@@ -209,13 +209,14 @@ WITH (
At present, the trigger can listen to all data insertion operations on the
time series. The hook can be called `BEFORE` or `AFTER` the data is inserted.
-`FULL-PATH` is the name of the time series that the trigger listens to. The
path must be a measurement path.
+`FULL-PATH` can be a time-series (measurement) path such as root.sg1.d1.s1, a
device path such as root.sg1.d1, a storage group path such as root.sg1, or even
a non-measurement path with business semantic such as root.sg1.x.
`CLASSNAME` is the full class name of the trigger.
-Note that `CLASSNAME`, `KEY` and `VALUE` in the attributes need to be quoted
in single or double quotes.
-
-
+Note
+1. `CLASSNAME`, `KEY` and `VALUE` in the attributes need to be quoted in
single or double quotes.
+2. Only one trigger can be registered per `full-path`.
+3. When multiple prefix paths of a path are registered with triggers, for
example, trigger `trigger-sg1d1s1` is registed on root.sg1.d1, trigger
`trigger-sg1d1` is registed on root.sg1.d1, and trigger `trigger-sg1` is
registed on root.sg1. When inserting data to root.sg1.d1.s1, triggers will be
triggered in the following order: trigger-sg1d1s1 -> trigger-sg1d1 ->
trigger-sg1.
### Drop Triggers
diff --git a/docs/zh/UserGuide/Process-Data/Triggers.md
b/docs/zh/UserGuide/Process-Data/Triggers.md
index c09d7fc33a..e89bc48291 100644
--- a/docs/zh/UserGuide/Process-Data/Triggers.md
+++ b/docs/zh/UserGuide/Process-Data/Triggers.md
@@ -189,11 +189,14 @@ WITH (
目前触发器可以侦听序列上的所有的数据插入操作,触发器可以选择在数据插入前(`BEFORE INSERT`)或者数据插入后(`AFTER
INSERT`)触发钩子调用。
-`FULL-PATH`是触发器侦听的目标序列名称,这个序列必须是一个测点。
+`FULL-PATH`
一个目标序列路径如root.sg1.d1.s1,或者是一个设备路径如root.sg1.d1,或者是一个存储组路径如root.sg1,抑或是一个业务语义节点路径如root.sg1.x。
`CLASSNAME`是触发器类的全类名。
-请注意,`CLASSNAME`以及属性值中的`KEY`和`VALUE`都需要被单引号或者双引号引用起来。
+请注意:
+1. `CLASSNAME`以及属性值中的`KEY`和`VALUE`都需要被单引号或者双引号引用起来。
+2. 每个`FULL-PATH`只支持注册一个触发器。
+3. 当存在多层路径同时注册触发器时,如root.sg1.d1.s1
注册一个触发器trigger-sg1d1s1,root.sg1.d1注册一个触发器trigger-sg1d1,root.sg1注册一个触发器trigger-sg1,在向root.sg1.d1.s1写入数据时,其触发顺序为trigger-sg1d1s1
-》trigger-sg1d1-》trigger-sg1。
### 卸载触发器