feat(rule_engine): rule sql add null function
This commit is contained in:
parent
cc6f43aea7
commit
a58357cfe3
|
@ -35,6 +35,7 @@
|
|||
, contains_topic/3
|
||||
, contains_topic_match/2
|
||||
, contains_topic_match/3
|
||||
, null/0
|
||||
]).
|
||||
|
||||
%% Arithmetic Funcs
|
||||
|
@ -300,6 +301,9 @@ find_topic_filter(Filter, TopicFilters, Func) ->
|
|||
throw:Result -> Result
|
||||
end.
|
||||
|
||||
null() ->
|
||||
undefined.
|
||||
|
||||
%%------------------------------------------------------------------------------
|
||||
%% Arithmetic Funcs
|
||||
%%------------------------------------------------------------------------------
|
||||
|
|
|
@ -228,6 +228,7 @@ tcp_connectivity(Host, Port, Timeout) ->
|
|||
unwrap(<<"${", Val/binary>>) ->
|
||||
binary:part(Val, {0, byte_size(Val)-1}).
|
||||
|
||||
sql_data(undefined) -> null;
|
||||
sql_data(List) when is_list(List) -> List;
|
||||
sql_data(Bin) when is_binary(Bin) -> Bin;
|
||||
sql_data(Num) when is_number(Num) -> Num;
|
||||
|
|
Loading…
Reference in New Issue