danieleteti / delphiredisclient

Redis client for Delphi
Apache License 2.0
309 stars 134 forks source link

Should INCR and ZINCRBY support int64? #17

Closed pony5551 closed 4 years ago

pony5551 commented 4 years ago

function TRedisClient.ParseIntegerResponse(var AValidResponse: boolean): Int64; var R: string; I: Integer; HowMany: Integer; begin Result := -1; if FInTransaction then begin R := ParseSimpleStringResponse(FValidResponse); if R <> 'QUEUED' then raise ERedisException.Create(R); Exit; end;

NextToken(R); if FIsTimeout then Exit; CheckResponseError(R);

case R.Chars[0] of ':': begin if not TryStrToInt(R.Substring(1), I) then //There is no support for int64 <============= raise ERedisException.CreateFmt (TRedisConsts.ERR_NOT_A_VALID_INTEGER_RESPONSE + ' - Expected Integer got [%s]', [R]); Result := I; end;