vibe.d beta banner
get vibe.d
0.8.4

Asynchronous I/O that doesn’t get in your way, written in D

Struct RedisDatabase

Accesses the contents of a Redis database

struct RedisDatabase ;

Properties

NameTypeDescription
client[get] inout(RedisClient)The Redis client with which the database is accessed.
index[get] longIndex of the database.

Methods

NameDescription
append Append a value to a key
blpop BLPOP is a blocking list pop primitive. It is the blocking version of LPOP because it blocks the connection when there are no elements to pop from any of the given lists.
dbSize Return the number of keys in the selected database
decr Decrement the integer value of a key by one
del Delete a key
deleteAll Deletes all keys of the database.
eval Execute a Lua script server side
evalSHA Evaluates a script cached on the server side by its SHA1 digest. Scripts are cached on the server side using the scriptLoad function.
exists Determine if a key exists
expire Set a key's time to live in seconds
expire Set a key's time to live with D notation. E.g. 5.minutes for 60 * 5 seconds.
expireAt Set the expiration for a key as a UNIX timestamp
get Get the value of a key
getBit Returns the bit value at offset in the string value stored at key
getRange Get a substring of the string stored at a key
getSet Set the string value of a key and return its old value
hdel Delete one or more hash fields
hexists Determine if a hash field exists
hget Get the value of a hash field.
hgetAll Get all the fields and values in a hash
hincr Increment the integer value of a hash field
hincr Increment the real number value of a hash field
hkeys Get all the fields in a hash
hlen Get the number of fields in a hash
hmget Get the values of all the given hash fields
hmset Set multiple hash fields to multiple values
hset Set multiple hash fields to multiple values
hsetNX Set the value of a hash field, only if the field does not exist
hvals Get all the values in a hash
incr Increment the integer value of a key
incr Increment the real number value of a key
keys Find all keys matching the given glob-style pattern (Supported wildcards: *, ?, [ABC])
lindex Get an element from a list by its index
linsertAfter Insert value in the list stored at key after the reference value pivot.
linsertBefore Insert value in the list stored at key before the reference value pivot.
llen Returns the length of the list stored at key. If key does not exist, it is interpreted as an empty list and 0 is returned.
lpop Removes and returns the first element of the list stored at key.
lpush Insert all the specified values at the head of the list stored at key.
lpushX Inserts value at the head of the list stored at key, only if key already exists and holds a list.
lrange Returns the specified elements of the list stored at key.
lrem Removes the first count occurrences of elements equal to value from the list stored at key.
lset Sets the list element at index to value.
ltrim Trim an existing list so that it will contain only the specified range of elements specified. Equivalent to range = range[start .. stop+1]
mget Get the values of all the given keys
move Move a key to another database
mset Set multiple keys to multiple values
msetNX Set multiple keys to multiple values, only if none of the keys exist
persist Remove the expiration from a key
pfadd Adds one or more Keys to a HyperLogLog data structure .
pfcount Returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified key.
pfmerge Merge multiple HyperLogLog values into a new one.
pttl Get the time to live for a key in milliseconds
publish Publishes a message to all clients subscribed at the channel
pubsub Inspect the state of the Pub/Sub subsystem
randomKey Return a random key from the keyspace
rename Rename a key
renameNX Rename a key, only if the new key does not exist
request Run the specified command and arguments in the Redis database server
rpop Removes and returns the last element of the list stored at key.
rpoplpush Atomically returns and removes the last element (tail) of the list stored at source, and pushes the element at the first element (head) of the list stored at destination.
rpush Insert all the specified values at the tail of the list stored at key.
rpushX Inserts value at the tail of the list stored at key, only if key already exists and holds a list.
sadd Add the specified members to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members.
scard Returns the set cardinality (number of elements) of the set stored at key.
scriptLoad Load a script into the scripts cache, without executing it. Run it using evalSHA.
sdiff Returns the members of the set resulting from the difference between the first set and all the successive sets.
sdiffStore This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination. If destination already exists, it is overwritten.
set Set the string value of a key
setBit Sets or clears the bit at offset in the string value stored at key
setEX Set the value and expiration of a key
setNX Set the value of a key, only if the key does not exist
setNX Set the value of a key, only if the key does not exist, and also set the specified expire time using D notation, e.g. 5.minutes for 5 minutes.
setRange Overwrite part of a string at key starting at the specified offset
setXX Set the value of a key, only if the key already exists
setXX Set the value of a key, only if the key already exists, and also set the specified expire time using D notation, e.g. 5.minutes for 5 minutes.
sinter Returns the members of the set resulting from the intersection of all the given sets.
sinterStore This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination. If destination already exists, it is overwritten.
sisMember Returns if member is a member of the set stored at key.
smembers Returns all the members of the set value stored at key.
smove Move member from the set at source to the set at destination. This operation is atomic. In every given moment the element will appear to be a member of source or destination for other clients.
spop Removes and returns a random element from the set value stored at key.
srandMember Returns a random element from the set stored at key.
srandMember returns count random elements from the set stored at key
srem Remove the specified members from the set stored at key.
strlen Get the length of the value stored in a key
sunion Returns the members of the set resulting from the union of all the given sets.
sunionStore This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.
ttl Get the time to live for a key
type Determine the type stored at key (string, list, set, zset and hash.)
zadd Add one or more members to a sorted set, or update its score if it already exists
zcard Returns the sorted set cardinality (number of elements) of the sorted set stored at key.
zcount Returns the number of elements in the sorted set at key with a score between min and max
zincrby Increments the score of member in the sorted set stored at key by increment.
zlexCount
zrange Returns the specified range of elements in the sorted set stored at key.
zrangeByLex When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.
zrangeByScore Returns all the elements in the sorted set at key with a score between start and end inclusively
zrangeByScore Computes an internal list of elements in the sorted set at key with a score between start and end inclusively, and returns a range subselection similar to results[offset .. offset+count]
zrank Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high.
zrem Removes the specified members from the sorted set stored at key.
zremRangeByRank Removes all elements in the sorted set stored at key with rank between start and stop.
zremRangeByScore Removes all elements in the sorted set stored at key with a score between min and max (inclusive).
zrevRange Returns the specified range of elements in the sorted set stored at key.
zrevRangeByScore Returns all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min).
zrevRangeByScore Computes an internal list of elements in the sorted set at key with a score between max and min, and returns a window of elements selected in a way equivalent to results[offset .. offset + count]
zrevRank Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low.
zscore Returns the score of member in the sorted set at key.
Authors

Jan Krüger, Sönke Ludwig, Michael Eisendle, Etienne Cimon

Copyright

© 2012-2016 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.