Fix return type problem

This commit is contained in:
Maas-Maarten Zeeman
2022-01-04 11:00:28 +01:00
parent 4e56d6cb9c
commit 1428e5396c
2 changed files with 19 additions and 3 deletions

View File

@@ -361,8 +361,12 @@ exec(Sql, [], #connection{raw_connection=RawConnection}, Timeout) ->
receive_answer(RawConnection, Ref, Timeout);
exec(Sql, Params, Connection, Timeout) ->
{ok, Statement} = prepare(Sql, Connection, Timeout),
bind(Statement, Params),
step(Statement, Timeout).
case bind(Statement, Params) of
ok ->
step(Statement, Timeout);
{error, _}=Error ->
Error
end.
%% @doc Return the number of affected rows of last statement.