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