Skip to content

Commit

Permalink
Fix list model
Browse files Browse the repository at this point in the history
  • Loading branch information
cinience committed Apr 15, 2015
1 parent 55cb62f commit b9d0014
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion RedisStudio/Redis/RedisListModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ bool RedisListModel::GetData( const std::string& key, RedisResult& results )
if (lenreply->type == REDIS_REPLY_INTEGER)
{
long long llen = lenreply->integer;
results.NewColumn("Value");
for (int idx=0; idx<llen; )
{
redisReply* reply = GetClient()->Command("LRANGE %s %d %d", key.c_str(), idx, idx+1000 > llen ? idx+1000 : llen - idx);
if (!reply) return retVal;
results.NewColumn("Value");

if (reply->type == REDIS_REPLY_ARRAY)
{
std::size_t i = 0;
Expand Down

0 comments on commit b9d0014

Please sign in to comment.