Просмотр исходного кода

fix(iotdb): improve the schema by gathering atoms into enums

firest 2 лет назад
Родитель
Сommit
b29fd486af
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      apps/emqx_bridge_iotdb/src/emqx_bridge_iotdb.erl

+ 2 - 2
apps/emqx_bridge_iotdb/src/emqx_bridge_iotdb.erl

@@ -113,7 +113,7 @@ fields(action_parameters_data) ->
     [
         {timestamp,
             mk(
-                hoconsc:union([now, now_ms, now_ns, now_us, binary()]),
+                hoconsc:union([enum([now, now_ms, now_ns, now_us]), binary()]),
                 #{
                     desc => ?DESC("config_parameters_timestamp"),
                     default => <<"now">>
@@ -129,7 +129,7 @@ fields(action_parameters_data) ->
             )},
         {data_type,
             mk(
-                hoconsc:union([text, boolean, int32, int64, float, double, binary()]),
+                hoconsc:union([enum([text, boolean, int32, int64, float, double]), binary()]),
                 #{
                     required => true,
                     desc => ?DESC("config_parameters_data_type")