Eugene Shubin 9 лет назад
Родитель
Сommit
d245b9dccd
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      src/epgsql_sock.erl

+ 5 - 3
src/epgsql_sock.erl

@@ -229,9 +229,11 @@ command({prepared_query, Statement, Parameters}, #state{codec = Codec} = State)
     #statement{name = StatementName, columns = Columns} = Statement,
     Bin1 = epgsql_wire:encode_parameters(Parameters, Codec),
     Bin2 = epgsql_wire:encode_formats(Columns),
-    send(State, ?BIND, ["", 0, StatementName, 0, Bin1, Bin2]),
-    send(State, ?EXECUTE, ["", 0, <<0:?int32>>]),
-    send(State, ?SYNC, []),
+    send_multi(State, [
+        {?BIND, ["", 0, StatementName, 0, Bin1, Bin2]},
+        {?EXECUTE, ["", 0, <<0:?int32>>]},
+        {?SYNC, []}
+    ]),
     {noreply, State};
 
 command({parse, Name, Sql, Types}, State) ->