瀏覽代碼

fix(meta): update sql source json to add lookup configuration

Signed-off-by: Jiyong Huang <huangjy@emqx.io>
Jiyong Huang 2 年之前
父節點
當前提交
afe153ca7c
共有 1 個文件被更改,包括 61 次插入0 次删除
  1. 61 0
      extensions/sources/sql/sql.json

+ 61 - 0
extensions/sources/sql/sql.json

@@ -247,6 +247,67 @@
           "en_US": "Query Template",
           "zh_CN": "查询模版"
         }
+      },
+      {
+        "name": "lookup",
+        "default": [
+          {
+            "name": "cache",
+            "default": true,
+            "optional": false,
+            "control": "radio",
+            "type": "bool",
+            "hint": {
+              "en_US": "Whether to enable cache for lookup",
+              "zh_CN": "是否开启查询缓存"
+            },
+            "label": {
+              "en_US": "Enable lookup cache",
+              "zh_CN": "开启查询缓存"
+            }
+          },
+          {
+            "name": "cacheTtl",
+            "default": "600",
+            "optional": true,
+            "control": "text",
+            "type": "string",
+            "hint": {
+              "en_US": "Cache Time To Live",
+              "zh_CN": "缓存时间"
+            },
+            "label": {
+              "en_US": "Cache TTL",
+              "zh_CN": "缓存时间"
+            }
+          },
+          {
+            "name": "cacheMissingKey",
+            "default": true,
+            "optional": false,
+            "control": "radio",
+            "type": "bool",
+            "hint": {
+              "en_US": "Whether to cache missing lookup of null value",
+              "zh_CN": "是否缓存未命中的空值"
+            },
+            "label": {
+              "en_US": "Cache missing key",
+              "zh_CN": "缓存未命中的 Key"
+            }
+          }
+        ],
+        "optional": true,
+        "control": "list",
+        "type": "list_object",
+        "hint": {
+          "en_US": "Lookup table configuration, only effective when using as a lookup table",
+          "zh_CN": "查询表配置,仅在作为查询表使用时生效"
+        },
+        "label": {
+          "en_US": "Lookup table configuration",
+          "zh_CN": "查询表配置"
+        }
       }
     ]
   },