Skip to content

Commit

Permalink
Added support for Exec
Browse files Browse the repository at this point in the history
  • Loading branch information
ik5 committed Feb 19, 2012
1 parent faa5cda commit 46ccf8c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/rd_commands.pas
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,22 @@ TRedisTransaction = class (TRedisCommands)
the socket
*)
function Multi : TRedisReturnType; virtual;

(*
Try to execute the commands inside the transaction.
Returns:
* TRedisErrorReturnType on failure
* TRedisMultiBulkReturnType with the answer of each command executed.
It keeps the order of the answer to the
order of the commands.
* nil on exception
Exceptions:
* ERedisException - When something went wrong in the parsing or with
the socket
*)
function Exec : TRedisReturnType; virtual;
published
property ErrorCode;
property Logger;
Expand All @@ -926,6 +942,11 @@ function TRedisTransaction.Multi: TRedisReturnType;
Result := send_command2('MULTI');
end;

function TRedisTransaction.Exec: TRedisReturnType;
begin
Result := send_command2('EXEC');
end;

{ TRedisServer }

function TRedisServer.BGRewriteAOF: TRedisReturnType;
Expand Down

0 comments on commit 46ccf8c

Please sign in to comment.