remove mysql test
This commit is contained in:
parent
53fbfc5b12
commit
d62eb192e2
@ -14,24 +14,6 @@
|
|||||||
%% API
|
%% API
|
||||||
-export([get_row/1, get_row/2, get_all/1, get_all/2]).
|
-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([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.
|
-spec get_row(Sql::binary()) -> {ok, Record::map()} | undefined.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user