|
@@ -159,6 +159,18 @@ execute_batch_test(Module) ->
|
|
|
Module:execute_batch(C, [{S1, [1]}, {S2, [1, 2]}])
|
|
|
end).
|
|
|
|
|
|
+batch_error_test(Module) ->
|
|
|
+ with_rollback(
|
|
|
+ Module,
|
|
|
+ fun(C) ->
|
|
|
+ {ok, S} = Module:parse(C, "insert into test_table1(id, value) values($1, $2)"),
|
|
|
+ [{ok, 1}, {ok, 1}, {ok, 1}] =
|
|
|
+ Module:execute_batch(C, [{S, [3, "batch_error 3"]},
|
|
|
+ {S, [2, "batch_error 2"]}, % duplicate key here
|
|
|
+ {S, [5, "batch_error 5"]}
|
|
|
+ ])
|
|
|
+ end).
|
|
|
+
|
|
|
extended_select_test(Module) ->
|
|
|
with_connection(
|
|
|
Module,
|