public static RedisInt ZRemRangeByScore(string key, double min, double max, bool exclusiveMin = false, bool exclusiveMax = false) { string min_score = RedisArgs.GetScore(min, exclusiveMin); string max_score = RedisArgs.GetScore(max, exclusiveMax); return(new RedisInt("ZREMRANGEBYSCORE", key, min_score, max_score)); }
private string CreateMessage(string command, params object[] args) { using (new ActivityTracer("Create message")) { string[] cmd = RedisArgs.Concat(command.ToString().Split(' '), args); ActivityTracer.Source.TraceEvent(TraceEventType.Information, 0, "Command: {0} {1}", command, String.Join(" ", args)); StringBuilder cmd_builder = new StringBuilder(); cmd_builder .Append(MultiBulk) .Append(cmd.Length) .Append(EOL); foreach (var arg in cmd) { cmd_builder .Append(Bulk) .Append(arg.Length) .Append(EOL); cmd_builder .Append(arg) .Append(EOL); } string cmd_protocol = cmd_builder.ToString(); ActivityTracer.Source.TraceEvent(TraceEventType.Verbose, 0, "Unified command: {0}", cmd_protocol); return(cmd_protocol); } }
public static RedisInt ZCount(string key, double min, double max, bool exclusiveMin = false, bool exclusiveMax = false) { string min_score = RedisArgs.GetScore(min, exclusiveMin); string max_score = RedisArgs.GetScore(max, exclusiveMax); return(new RedisInt("ZCOUNT", key, min_score, max_score)); }
public static RedisStrings ZRevRangeByScore(string key, double max, double min, bool withScores = false, bool exclusiveMax = false, bool exclusiveMin = false, long?offset = null, long?count = null) { string min_score = RedisArgs.GetScore(min, exclusiveMin); string max_score = RedisArgs.GetScore(max, exclusiveMax); string[] args = new[] { key, max_score, min_score }; 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 RedisStrings("ZREVRANGEBYSCORE", args)); }
public static RedisInt RPushX(string key, params object[] values) { string[] args = RedisArgs.Concat(key, values); return(new RedisInt("RPUSHX", args)); }
public static RedisInt ZRem(string key, params object[] members) { string[] args = RedisArgs.Concat(new[] { key }, members); return(new RedisInt("ZREM", args)); }
public static RedisInt ZAdd(string key, params string[] memberScores) { object[] args = RedisArgs.Concat(key, memberScores); return(new RedisInt("ZADD", args)); }
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)); }
public static RedisIntNull Object(RedisObjectSubCommand subCommand, params string[] arguments) { object[] args = RedisArgs.Concat(subCommand.ToString(), arguments); return(new RedisIntNull("OBJECT", args)); }
public static RedisStatus MSet(params Tuple <string, string>[] keyValues) { object[] args = RedisArgs.GetTupleArgs(keyValues); return(new RedisStatus("MSET", args)); }
public static RedisInt BitOp(RedisBitOp operation, string destKey, params string[] keys) { string[] args = RedisArgs.Concat(new[] { operation.ToString().ToUpper(), destKey }, keys); return(new RedisInt("BITOP", args)); }
public static RedisValue BRPop(int timeout, params string[] keys) { string[] args = RedisArgs.Concat(keys, new object[] { timeout }); return(new RedisValue("BRPOP", args)); }
public static RedisInt LPush(string key, params object[] values) { string[] args = RedisArgs.Concat(new[] { key }, values); return(new RedisInt("LPUSH", args)); }
public static RedisTuple BLPopWithKey(int timeout, params string[] keys) { string[] args = RedisArgs.Concat(keys, new object[] { timeout }); return(new RedisTuple("BLPOP", args)); }
public static RedisStrings HMGet(string key, params string[] fields) { string[] args = RedisArgs.Concat(key, fields); return(new RedisStrings("HMGET", args)); }
public static RedisInt HDel(string key, params string[] fields) { string[] args = RedisArgs.Concat(key, fields); return(new RedisInt("HDEL", args)); }
public static RedisStatus PfMerge(string destKey, params string[] sourceKeys) { string[] args = RedisArgs.Concat(destKey, sourceKeys); return(new RedisStatus("PFMERGE", args)); }
public static RedisInt PfAdd(string key, params object[] elements) { string[] args = RedisArgs.Concat(key, elements); return(new RedisInt("PFADD", args)); }
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)); }
public static RedisInt SInterStore(string destination, params string[] keys) { object[] args = RedisArgs.Concat(destination, keys); return(new RedisInt("SINTERSTORE", args)); }
public static RedisString ObjectEncoding(params string[] arguments) { string[] args = RedisArgs.Concat("ENCODING", arguments); return(new RedisString("OBJECT", args)); }
public static RedisInt SRem(string key, params object[] members) { object[] args = RedisArgs.Concat(key, members); return(new RedisInt("SREM", args)); }
public static RedisBool MSetNx(params Tuple <string, string>[] keyValues) { object[] args = RedisArgs.GetTupleArgs(keyValues); return(new RedisBool("MSETNX", args)); }
public static RedisInt SUnionStore(string destination, params string[] keys) { string[] args = RedisArgs.Concat(destination, keys); return(new RedisInt("SUNIONSTORE", args)); }