Ejemplo n.º 1
0
        public static RedisArray.Tuples <string, double> ZRevRangeByScoreWithScores(string key, string max, string min, long?offset = null, long?count = null)
        {
            string[] args = new[] { key, max, min, "WITHSCORES" };
            if (offset.HasValue && count.HasValue)
            {
                args = RedisArgs.Concat(args, new[] { "LIMIT", offset.Value.ToString(), count.Value.ToString() });
            }

            return(new RedisArray.Tuples <string, double>("ZREVRANGEBYSCORE", args));
        }
Ejemplo n.º 2
0
        public static RedisArray.Strings ZRevRangeByScore(string key, string max, string min, bool withScores = false, long?offset = null, long?count = null)
        {
            string[] args = new[] { key, max, min };
            if (withScores)
            {
                args = RedisArgs.Concat(args, new[] { "WITHSCORES" });
            }
            if (offset.HasValue && count.HasValue)
            {
                args = RedisArgs.Concat(args, new[] { "LIMIT", offset.Value.ToString(), count.Value.ToString() });
            }

            return(new RedisArray.Strings("ZREVRANGEBYSCORE", args));
        }
Ejemplo n.º 3
0
 public static RedisInt SUnionStore(string destination, params string[] keys)
 {
     string[] args = RedisArgs.Concat(destination, keys);
     return(new RedisInt("SUNIONSTORE", args));
 }
Ejemplo n.º 4
0
 public static RedisInt SRem(string key, params object[] members)
 {
     object[] args = RedisArgs.Concat(key, members);
     return(new RedisInt("SREM", args));
 }
Ejemplo n.º 5
0
 public static RedisInt SInterStore(string destination, params string[] keys)
 {
     object[] args = RedisArgs.Concat(destination, keys);
     return(new RedisInt("SINTERSTORE", args));
 }
Ejemplo n.º 6
0
 public static RedisObject.Strings Eval(string script, string[] keys, params string[] arguments)
 {
     string[] args = RedisArgs.Concat(new object[] { script, keys.Length }, keys, arguments);
     return(new RedisObject.Strings("EVAL", args));
 }
Ejemplo n.º 7
0
 public static RedisObject EvalSHA(string sha1, string[] keys, params string[] arguments)
 {
     string[] args = RedisArgs.Concat(new object[] { sha1, keys.Length }, keys, arguments);
     return(new RedisObject("EVALSHA", args));
 }
Ejemplo n.º 8
0
 public static RedisInt ZRem(string key, params object[] members)
 {
     string[] args = RedisArgs.Concat(new[] { key }, members);
     return(new RedisInt("ZREM", args));
 }
Ejemplo n.º 9
0
 public static RedisArray.Strings HMGet(string key, params string[] fields)
 {
     string[] args = RedisArgs.Concat(key, fields);
     return(new RedisArray.Strings("HMGET", args));
 }
Ejemplo n.º 10
0
 public static RedisInt HDel(string key, params string[] fields)
 {
     string[] args = RedisArgs.Concat(key, fields);
     return(new RedisInt("HDEL", args));
 }
Ejemplo n.º 11
0
 public static RedisStatus PfMerge(string destKey, params string[] sourceKeys)
 {
     string[] args = RedisArgs.Concat(destKey, sourceKeys);
     return(new RedisStatus("PFMERGE", args));
 }
Ejemplo n.º 12
0
 public static RedisBool PfAdd(string key, params object[] elements)
 {
     string[] args = RedisArgs.Concat(key, elements);
     return(new RedisBool("PFADD", args));
 }
Ejemplo n.º 13
0
 public static RedisInt.Nullable Object(RedisObjectSubCommand subCommand, params string[] arguments)
 {
     object[] args = RedisArgs.Concat(subCommand.ToString().ToUpperInvariant(), arguments);
     return(new RedisInt.Nullable("OBJECT", args));
 }
Ejemplo n.º 14
0
 public static RedisInt BitOp(RedisBitOp operation, string destKey, params string[] keys)
 {
     string[] args = RedisArgs.Concat(new[] { operation.ToString().ToUpperInvariant(), destKey }, keys);
     return(new RedisInt("BITOP", args));
 }
Ejemplo n.º 15
0
 public static RedisInt ZAdd <TScore, TMember>(string key, params Tuple <TScore, TMember>[] memberScores)
 {
     object[] args = RedisArgs.Concat(key, RedisArgs.GetTupleArgs(memberScores));
     return(new RedisInt("ZADD", args));
 }
Ejemplo n.º 16
0
 public static RedisInt ZAdd(string key, params string[] memberScores)
 {
     object[] args = RedisArgs.Concat(key, memberScores);
     return(new RedisInt("ZADD", args));
 }
Ejemplo n.º 17
0
 public static RedisTuple BRPopWithKey(int timeout, params string[] keys)
 {
     string[] args = RedisArgs.Concat(keys, new object[] { timeout });
     return(new RedisTuple("BRPOP", args));
 }
Ejemplo n.º 18
0
 public static RedisArray.IndexOf <string> BRPop(int timeout, params string[] keys)
 {
     string[] args = RedisArgs.Concat(keys, new object[] { timeout });
     return(new RedisArray.IndexOf <string>(new RedisString("BRPOP", args), 1));
 }
Ejemplo n.º 19
0
 public static RedisInt LPush(string key, params object[] values)
 {
     string[] args = RedisArgs.Concat(new[] { key }, values);
     return(new RedisInt("LPUSH", args));
 }
Ejemplo n.º 20
0
 public static RedisArray.Tuples <string, long> PubSubNumSub(params string[] channels)
 {
     string[] args = RedisArgs.Concat("NUMSUB", channels);
     return(new RedisArray.Tuples <string, long>("PUBSUB", args));
 }
Ejemplo n.º 21
0
 public static RedisInt RPushX(string key, params object[] values)
 {
     string[] args = RedisArgs.Concat(key, values);
     return(new RedisInt("RPUSHX", args));
 }
Ejemplo n.º 22
0
 public static RedisString ObjectEncoding(params string[] arguments)
 {
     string[] args = RedisArgs.Concat("ENCODING", arguments);
     return(new RedisString("OBJECT", args));
 }
Ejemplo n.º 23
0
 public static RedisArray.StrongPairs <string, long> PubSubNumSub(params string[] channels)
 {
     string[] args = RedisArgs.Concat("NUMSUB", channels);
     return(new RedisArray.StrongPairs <string, long>(
                new RedisString(null), new RedisInt(null), "PUBSUB", args));
 }