Skip to content

RedisTTL have only one parameter #142

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Quick.Data.Redis.pas
Original file line number Diff line number Diff line change
@@ -144,7 +144,7 @@ TRedisClient = class
function RedisZRANGE(const aKey : string; aStartPosition, aEndPosition : Int64) : TArray<string>;
function RedisZRANGEBYSCORE(const aKey : string; aMinScore, aMaxScore : Int64) : TArray<TRedisSortedItem>;
function RedisLLEN(const aKey : string): Integer;
function RedisTTL(const aKey, aValue : string): Integer;
function RedisTTL(const aKey: string): Integer;
function RedisAUTH(const aPassword : string) : Boolean;
function RedisPING : Boolean;
function RedisQUIT : Boolean;
@@ -468,16 +468,15 @@ function TRedisClient.RedisLLEN(const aKey : string): Integer;
Result := response.Response.ToInteger;
end;
end;

function TRedisClient.RedisTTL(const aKey, aValue : string): Integer;
function TRedisClient.RedisTTL(const aKey : string): Integer;
var
rediscmd : IRedisCommand;
response : IRedisResponse;
begin
Result := 0;
rediscmd := TRedisCommand.Create('TTL')
.AddArgument(aKey)
.AddArgument(aValue);
;
response := Command(rediscmd.ToCommand);
if response.IsDone then
begin