Fix return type problem
This commit is contained in:
@@ -24,6 +24,9 @@ CFlags =
|
|||||||
|
|
||||||
[
|
[
|
||||||
{require_min_otp_vsn, "21"},
|
{require_min_otp_vsn, "21"},
|
||||||
|
|
||||||
|
{xref_checks, [undefined_function_calls]},
|
||||||
|
|
||||||
{port_env, [
|
{port_env, [
|
||||||
%% Default darwin ldflags causes loading of system sqlite. Removed -bundle flag.
|
%% Default darwin ldflags causes loading of system sqlite. Removed -bundle flag.
|
||||||
{"darwin", "DRV_LDFLAGS",
|
{"darwin", "DRV_LDFLAGS",
|
||||||
@@ -46,5 +49,14 @@ CFlags =
|
|||||||
{provider_hooks,
|
{provider_hooks,
|
||||||
[{post,
|
[{post,
|
||||||
[{compile, {pc, compile}},
|
[{compile, {pc, compile}},
|
||||||
{clean, {pc, clean}}]}]}
|
{clean, {pc, clean}}]}]},
|
||||||
|
|
||||||
|
{dialyzer, [
|
||||||
|
{warnings, [
|
||||||
|
unmatched_returns,
|
||||||
|
error_handling,
|
||||||
|
race_conditions
|
||||||
|
% underspecs
|
||||||
|
]}
|
||||||
|
]}
|
||||||
].
|
].
|
||||||
|
|||||||
@@ -361,8 +361,12 @@ exec(Sql, [], #connection{raw_connection=RawConnection}, Timeout) ->
|
|||||||
receive_answer(RawConnection, Ref, Timeout);
|
receive_answer(RawConnection, Ref, Timeout);
|
||||||
exec(Sql, Params, Connection, Timeout) ->
|
exec(Sql, Params, Connection, Timeout) ->
|
||||||
{ok, Statement} = prepare(Sql, Connection, Timeout),
|
{ok, Statement} = prepare(Sql, Connection, Timeout),
|
||||||
bind(Statement, Params),
|
case bind(Statement, Params) of
|
||||||
step(Statement, Timeout).
|
ok ->
|
||||||
|
step(Statement, Timeout);
|
||||||
|
{error, _}=Error ->
|
||||||
|
Error
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
%% @doc Return the number of affected rows of last statement.
|
%% @doc Return the number of affected rows of last statement.
|
||||||
|
|||||||
Reference in New Issue
Block a user