diff --git a/apps/iot/src/mysql_client.erl b/apps/iot/src/mysql_client.erl index 8e7770e..8c111e8 100644 --- a/apps/iot/src/mysql_client.erl +++ b/apps/iot/src/mysql_client.erl @@ -14,24 +14,6 @@ %% API -export([get_row/1, get_row/2, get_all/1, get_all/2]). -export([update/3, update_by/1, update_by/2, insert/3]). --export([test/0]). - -test() -> - - Result = get_row(<<"select * from Carport limit 10">>), - lager:info("[mysql_client] the result is: ~p", [Result]), - - Result1 = get_all(<<"select * from Carport limit 10">>), - lager:info("[mysql_client] the result is: ~p", [Result1]), - - InsertResult = insert(<<"CarInfo">>, [{<<"owner_name">>, <<"anlicheng">>}], false), - lager:info("[mysql_client] the insert id is: ~p", [InsertResult]), - - UpdateResult = update_by(<<"update CarInfo set owner_name = AiYaLing123 where car_id = ? limit 1">>, [1]), - - lager:info("[mysql_client] the update result is: ~p", [UpdateResult]), - - ok. %% 从数据库中查找一行记录 -spec get_row(Sql::binary()) -> {ok, Record::map()} | undefined.