Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #17 from eddelbuettel/master

add missing redisZCount command
  • Loading branch information...
commit da97dc7a622471d09f1d7d70bda2a2d939603eb2 2 parents 98bdaad + 17d4254
@bwlewis authored
View
4 DESCRIPTION
@@ -1,8 +1,8 @@
Package: rredis
Type: Package
Title: Redis client for R
-Version: 1.6.8
-Date: 2013-09-16
+Version: 1.6.8.1
+Date: 2014-01-05
Author: B. W. Lewis
Maintainer: B. W. Lewis <blewis@illposed.net>
Description: An R client for the Redis persistent key-value database available from http://redis.io.
View
7 R/zsetVal.R
@@ -75,6 +75,13 @@ redisZRemRangeByScore <- function(key, min, max)
.redisCmd(.raw('ZREMRANGEBYSCORE'), .raw(key), .raw(min), .raw(max))
}
+redisZCount <- function(key, min, max)
+{
+ min <- as.character(min)
+ max <- as.character(max)
+ .redisCmd(.raw('ZCOUNT'), .raw(key), .raw(min), .raw(max))
+}
+
redisZCard <- function(key)
{
.redisCmd(.raw('ZCARD'), .raw(key))
View
38 man/redisZCount.Rd
@@ -0,0 +1,38 @@
+\name{redisZCount}
+\alias{redisZCount}
+%- Also NEED an '\alias' for EACH other topic documented here.
+\title{
+redisZCount
+}
+\description{
+Returns the number of elements in the sorted set at key with a score between min and max.
+The min and max arguments have the same semantic as described for \code{redisZRangeByScore}.
+}
+\usage{
+redisZCount(key, min, max)
+}
+%- maybe also 'usage' for other objects documented here.
+\arguments{
+ \item{key}{
+The set name.
+}
+ \item{min}{
+Minimum score.
+}
+ \item{max}{
+Maximum score.
+}
+}
+\value{
+See the Redis documentation for more information.
+%% If it is a LIST, use
+%% \item{comp1 }{Description of 'comp1'}
+%% \item{comp2 }{Description of 'comp2'}
+%% ...
+}
+\references{
+http://redis.io/commands
+}
+\author{
+B. W. Lewis
+}
View
1  src/libsock.c
@@ -24,7 +24,6 @@
*/
SEXP SOCK_NAGLE(SEXP S, SEXP VAL)
{
- SEXP ans = R_NilValue;
int val = INTEGER(VAL)[0];
#ifdef WIN32
SOCKET s = (SOCKET)INTEGER(S)[0];
Please sign in to comment.
Something went wrong with that request. Please try again.