MCPcopy Create free account
hub / github.com/cinience/RedisStudio / GetData

Method GetData

RedisStudio/Redis/RedisStringModel.cpp:9–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7}
8
9bool RedisStringModel::GetData( const std::string& key, RedisResult& results )
10{
11 bool retVal = false;
12 redisReply* reply = GetClient()->Command("GET %s", key.c_str());
13 if (!reply) return retVal;
14 results.NewColumn("Value");
15 if (reply->type == REDIS_REPLY_STRING)
16 {
17 results.NewRow();
18 string& myvalue = results.Value(results.RowSize()-1, 0);
19 myvalue.assign(reply->str, reply->len);
20 retVal = true;
21 }
22 freeReplyObject(reply);
23 return retVal;
24}
25
26bool RedisStringModel::UpdateData( const std::string& key,
27 const std::string& oldValue,

Callers

nothing calls this directly

Calls 6

freeReplyObjectFunction · 0.85
CommandMethod · 0.80
NewColumnMethod · 0.80
NewRowMethod · 0.80
ValueMethod · 0.80
RowSizeMethod · 0.80

Tested by

no test coverage detected