vibe.d beta banner
get vibe.d
0.8.1

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
appendAppend a value to a key
blpopBLPOP is a blocking list pop primitive. It is the blocking version of LPOP because it blocks
dbSizeReturn the number of keys in the selected database
decrDecrement the integer value of a key by one
delDelete a key
deleteAllDeletes all keys of the database.
evalExecute a Lua script server side
evalSHAEvaluates a script cached on the server side by its SHA1 digest. Scripts are cached on the server side using the scriptLoad function.
existsDetermine if a key exists
expireSet a key's time to live in seconds
expireSet a key's time to live with D notation. E.g. 5.minutes for 60 * 5 seconds.
expireAtSet the expiration for a key as a UNIX timestamp
getGet the value of a key
getBitReturns the bit value at offset in the string value stored at key
getRangeGet a substring of the string stored at a key
getSetSet the string value of a key and return its old value
hdelDelete one or more hash fields
hexistsDetermine if a hash field exists
hgetGet the value of a hash field.
hgetAllGet all the fields and values in a hash
hincrIncrement the real number value of a hash field
hincrIncrement the integer value of a hash field
hkeysGet all the fields in a hash
hlenGet the number of fields in a hash
hmgetGet the values of all the given hash fields
hmsetSet multiple hash fields to multiple values
hsetSet multiple hash fields to multiple values
hsetNXSet the value of a hash field, only if the field does not exist
hvalsGet all the values in a hash
incrIncrement the integer value of a key
incrIncrement the real number value of a key
keysFind all keys matching the given glob-style pattern (Supported wildcards: *, ?, [ABC])
lindexGet an element from a list by its index
linsertAfterInsert value in the list stored at key after the reference value pivot.
linsertBeforeInsert value in the list stored at key before the reference value pivot.
llenReturns the length of the list stored at key. If key does not exist, it is interpreted as an empty list and 0 is returned.
lpopRemoves and returns the first element of the list stored at key.
lpushInsert all the specified values at the head of the list stored at key.
lpushXInserts value at the head of the list stored at key, only if key already exists and holds a list.
lrangeReturns the specified elements of the list stored at key.
lremRemoves the first count occurrences of elements equal to value from the list stored at key.
lsetSets the list element at index to value.
ltrimTrim an existing list so that it will contain only the specified range of elements specified.
mgetGet the values of all the given keys
moveMove a key to another database
msetSet multiple keys to multiple values
msetNXSet multiple keys to multiple values, only if none of the keys exist
persistRemove the expiration from a key
pfaddAdds one or more Keys to a HyperLogLog data structure .
pfcountReturns the approximated cardinality computed by the HyperLogLog data structure stored at the specified key.
pfmergeMerge multiple HyperLogLog values into a new one.
pttlGet the time to live for a key in milliseconds
publishPublishes a message to all clients subscribed at the channel
pubsubInspect the state of the Pub/Sub subsystem
randomKeyReturn a random key from the keyspace
renameRename a key
renameNXRename a key, only if the new key does not exist
requestRun the specified command and arguments in the Redis database server
rpopRemoves and returns the last element of the list stored at key.
rpoplpushAtomically returns and removes the last element (tail) of the list stored at source,
rpushInsert all the specified values at the tail of the list stored at key.
rpushXInserts value at the tail of the list stored at key, only if key already exists and holds a list.
saddAdd the specified members to the set stored at key. Specified members that are already a member of this set are ignored.
scardReturns the set cardinality (number of elements) of the set stored at key.
scriptLoadLoad a script into the scripts cache, without executing it. Run it using evalSHA.
sdiffReturns the members of the set resulting from the difference between the first set and all the successive sets.
sdiffStoreThis command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.
setSet the string value of a key
setBitSets or clears the bit at offset in the string value stored at key
setEXSet the value and expiration of a key
setNXSet 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.
setNXSet the value of a key, only if the key does not exist
setRangeOverwrite part of a string at key starting at the specified offset
setXXSet 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.
setXXSet the value of a key, only if the key already exists
sinterReturns the members of the set resulting from the intersection of all the given sets.
sinterStoreThis command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.
sisMemberReturns if member is a member of the set stored at key.
smembersReturns all the members of the set value stored at key.
smoveMove member from the set at source to the set at destination. This operation is atomic.
spopRemoves and returns a random element from the set value stored at key.
srandMemberReturns a random element from the set stored at key.
srandMemberreturns count random elements from the set stored at key
sremRemove the specified members from the set stored at key.
strlenGet the length of the value stored in a key
sunionReturns the members of the set resulting from the union of all the given sets.
sunionStoreThis command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.
ttlGet the time to live for a key
typeDetermine the type stored at key (string, list, set, zset and hash.)
zaddAdd one or more members to a sorted set, or update its score if it already exists
zcardReturns the sorted set cardinality (number of elements) of the sorted set stored at key.
zcountReturns the number of elements in the sorted set at key with a score between min and max
zincrbyIncrements the score of member in the sorted set stored at key by increment.
zrangeReturns the specified range of elements in the sorted set stored at key.
zrangeByLexWhen all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering,
zrangeByScoreComputes an internal list of elements in the sorted set at key with a score between start and end inclusively,
zrangeByScoreReturns all the elements in the sorted set at key with a score between start and end inclusively
zrankReturns the rank of member in the sorted set stored at key, with the scores ordered from low to high.
zremRemoves the specified members from the sorted set stored at key.
zremRangeByRankRemoves all elements in the sorted set stored at key with rank between start and stop.
zremRangeByScoreRemoves all elements in the sorted set stored at key with a score between min and max (inclusive).
zrevRangeReturns the specified range of elements in the sorted set stored at key.
zrevRangeByScoreReturns 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).
zrevRangeByScoreComputes an internal list of elements in the sorted set at key with a score between max and min, and
zrevRankReturns the rank of member in the sorted set stored at key, with the scores ordered from high to low.
zscoreReturns 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.