Skip to content

Commit

Permalink
Merge pull request #280 from moechofe/master
Browse files Browse the repository at this point in the history
LPUSHX was not correctly implemented and RPUSHX was missing
  • Loading branch information
s-ludwig committed Aug 2, 2013
2 parents 29f84fc + b77529e commit 755d839
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions source/vibe/db/redis/redis.d
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,17 @@ final class RedisClient {
return request!size_t("LPUSH", list);
}

size_t lpushX(ARGS...)(string key, T value) {
return request!size_t("LPUSH", cast(ubyte[])key, cast(ubyte[])value);
size_t lpushX(T)(string key, T value) {
return request!size_t("LPUSHX", cast(ubyte[])key, cast(ubyte[])value);
}

size_t rpush(ARGS...)(string key, ARGS args) {
ubyte[][] list = cast(ubyte[])key ~ argsToUbyte!ARGS(args);
return request!size_t("RPUSH", list);
}

size_t rpushX(T)(string key, T value) {
return request!size_t("RPUSHX", cast(ubyte[])key, cast(ubyte[])value);
}

RedisReply lrange(string key, size_t start, size_t stop) {
Expand Down

0 comments on commit 755d839

Please sign in to comment.