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

Method DelKey

RedisStudio/SSDB/SSDBClient.cpp:200–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200bool SSDBClient::DelKey( const std::string& key )
201{
202 Base::Mutex::ScopedLock scopedLock(m_oMutex);
203 std::string realKey = RealKey(key);
204 std::string type;
205 if (!Type(key, type)) return false;
206 if (type == "string")
207 {
208 m_Client->del(realKey);
209 }
210 else if (type == "hash")
211 {
212 int64_t size;
213 m_Client->hclear(realKey, &size);
214 }
215 else if (type == "zset")
216 {
217 int64_t size;
218 m_Client->zclear(realKey, &size);
219 }
220 else if (type == "queue")
221 {
222 m_Client->request("qclear", realKey);
223 }
224 return true;
225}
226
227bool SSDBClient::UpdateData( const std::string& key,
228 const std::string& oldValue,

Callers 1

OnKeyDelMethod · 0.45

Calls 5

TypeEnum · 0.85
delMethod · 0.80
hclearMethod · 0.80
zclearMethod · 0.80
requestMethod · 0.45

Tested by

no test coverage detected