protected virtual TypedRedisValue Rpush(RedisClient client, RedisRequest request) { var key = request.GetKey(1); long length = -1; for (int i = 2; i < request.Count; i++) { length = Rpush(client.Database, key, request.GetValue(i)); } return(TypedRedisValue.Integer(length)); }
protected virtual TypedRedisValue Srem(RedisClient client, RedisRequest request) { int removed = 0; var key = request.GetKey(1); for (int i = 2; i < request.Count; i++) { if (Srem(client.Database, key, request.GetValue(i))) { removed++; } } return(TypedRedisValue.Integer(removed)); }
protected virtual TypedRedisValue Sismember(RedisClient client, RedisRequest request) => Sismember(client.Database, request.GetKey(1), request.GetValue(2)) ? TypedRedisValue.One : TypedRedisValue.Zero;