Added errors handling to the try_multi_step

This commit is contained in:
Alex Golubov
2018-07-12 15:31:56 +05:00
parent f5d73f7c82
commit ad1f9b83c5

View File

@@ -220,8 +220,11 @@ try_multi_step(Statement, ChunkSize, Rest, Tries) ->
erlang:display({"busy", Tries}),
timer:sleep(100 * Tries),
try_multi_step(Statement, ChunkSize, Rows ++ Rest, Tries + 1);
{Status, Rows} ->
{Status, Rows ++ Rest}
{rows, Rows} ->
{rows, Rows ++ Rest};
{'$done', Rows} ->
{'$done', Rows ++ Rest};
Else -> Else
end.
%% @doc Execute Sql statement, returns the number of affected rows.