Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPUSHX was not correctly implemented and RPUSHX was missing #280

Merged
merged 2 commits into from
Aug 2, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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