Пример #1
0
bool xRedisClient::smove(const RedisDBIdx& dbi,  const KEY& srckey, const KEY& deskey,  const VALUE& member) {
	if (0 == srckey.length()) {
		return false;
	}
	SETDEFAULTIOTYPE(MASTER);
	return command_bool(dbi, "SMOVE %s", srckey.c_str(), deskey.c_str(), member.c_str());
}
Пример #2
0
bool xRedisClient::srandmember(const RedisDBIdx& dbi,  const KEY& key, VALUES& members, int count) {
	if (0 == key.length()) {
		return false;
	}
	SETDEFAULTIOTYPE(SLAVE);
	if (0 == count) {
		return command_list(dbi, members, "SRANDMEMBER %s", key.c_str());
	}
	return command_list(dbi, members, "SRANDMEMBER %s %d", key.c_str(), count);
}
Пример #3
0
bool xRedisClient::spop(const RedisDBIdx& dbi,  const KEY& key, VALUE& member) {
	if (0 == key.length()) {
		return false;
	}
	SETDEFAULTIOTYPE(MASTER);
	return command_string(dbi, member, "SPOP %s", key.c_str());
}
Пример #4
0
bool xRedisClient::smembers(const RedisDBIdx& dbi,  const KEY& key, VALUES& vValue) {
	if (0 == key.length()) {
		return false;
	}
	SETDEFAULTIOTYPE(SLAVE);
	return command_list(dbi, vValue, "SMEMBERS %s", key.c_str());
}
Пример #5
0
bool xRedisClient::smove(const RedisDBIdx& dbi,  const KEY& srckey, const KEY& deskey,  const VALUE& member) {
    return command_bool(dbi, "SMOVE %s", srckey.c_str(), deskey.c_str(), member.c_str());
}
Пример #6
0
bool xRedisClient::smember(const RedisDBIdx& dbi,  const KEY& key, VALUES& vValue) {
    return command_list(dbi, vValue, "SMEMBER %s", key.c_str());
}
Пример #7
0
bool xRedisClient::sismember(const RedisDBIdx& dbi,  const KEY& key,   const VALUE& member) {
    return command_bool(dbi, "SISMEMBER %s %s", key.c_str(), member.c_str());
}
Пример #8
0
bool xRedisClient::srandmember(const RedisDBIdx& dbi,  const KEY& key, VALUES& members, int count) {
    if (0==count) {
        return command_list(dbi, members, "SRANDMEMBER %s", key.c_str());
    }
    return command_list(dbi, members, "SRANDMEMBER %s %d", key.c_str(), count);
}
Пример #9
0
bool xRedisClient::spop(const RedisDBIdx& dbi,  const KEY& key, VALUE& member) {
    return command_string(dbi, member, "SPOP %s", key.c_str());
}