| 8 | } |
| 9 | |
| 10 | bool SSDBStringModel::GetData( const std::string& key, RedisResult& results ) |
| 11 | { |
| 12 | std::string val; |
| 13 | if (GetClient()->get(key, &val).ok()) |
| 14 | { |
| 15 | results.NewColumn("Value"); |
| 16 | results.NewRow(); |
| 17 | string& myvalue = results.Value(results.RowSize()-1, 0); |
| 18 | myvalue = val; |
| 19 | return true; |
| 20 | } |
| 21 | else |
| 22 | { |
| 23 | return false; |
| 24 | } |
| 25 | return true; |
| 26 | } |
| 27 | |
| 28 | bool SSDBStringModel::UpdateData( const std::string& key, |
| 29 | const std::string& oldValue, |