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

Method GetData

RedisStudio/SSDB/SSDBHashModel.cpp:10–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8}
9
10bool SSDBHashModel::GetData( const std::string& key, RedisResult& results )
11{
12 std::vector<std::string> hmkeys ;
13 if (GetClient()->hkeys(key, "", "", 200000, &hmkeys).error())
14 {
15 return false;
16 }
17 results.NewColumn("Field ");
18 results.NewColumn("Value");
19 std::string val;
20 for (std::size_t idx=0; idx<hmkeys.size(); ++idx)
21 {
22 if (GetClient()->hget(key, hmkeys[idx], &val).error())
23 {
24 return false;
25 }
26 results.NewRow();
27 std::string& field = results.Value(results.RowSize()-1, 0);
28 std::string& value = results.Value(results.RowSize()-1, 1);
29 field = hmkeys[idx];
30 value = val;
31 }
32 return true;
33}
34
35bool SSDBHashModel::UpdateData( const std::string& key,
36 const std::string& oldValue,

Callers

nothing calls this directly

Calls 8

hkeysMethod · 0.80
NewColumnMethod · 0.80
hgetMethod · 0.80
NewRowMethod · 0.80
ValueMethod · 0.80
RowSizeMethod · 0.80
errorMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected