RedisMulti
public class RedisMulti
The RedisMulti class is a handle for issueing transactions
against a Redis
server. Instances of the RedisMulti class are created using the Redis.multi
function. These transactions are built using the various command related functions
of the RedisMulti class. Once a transaction
is built, it is sent to the Redis
server and run using the RedisMulti.exec function.
-
Send the transaction to the server and run it.
Parameter
Parameter callback: a function returning the response in the form of aRedisResponseDeclaration
Swift
public func exec(_ callback: @escaping (RedisResponse) -> Void)Parameters
callbacka function returning the response in the form of a
RedisResponse
-
Add an APPEND command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter value: The value to append.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func append(_ key: String, value: String) -> RedisMultiParameters
keyThe key.
valueThe value to append.
Return Value
The
RedisMultiobject being added to. -
Add a BITCOUNT command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func bitcount(_ key: String) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a BITCOUNT command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter start: The starting index in the string to count from.Parameter
Parameter end: The ending index in the string to count to.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func bitcount(_ key: String, start: Int, end: Int) -> RedisMultiParameters
keyThe key.
startThe starting index in the string to count from.
endThe ending index in the string to count to.
Return Value
The
RedisMultiobject being added to. -
Add a BITOP AND command to the
transaction
Parameter
Parameter destKey: The destination key.Parameter
Parameter and: The list of keys whose values will be AND'ed.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func bitop(_ destKey: String, and: String...) -> RedisMultiParameters
destKeyThe destination key.
andThe list of keys whose values will be AND’ed.
Return Value
The
RedisMultiobject being added to. -
Add a BITOP NOT command to the
transaction
Parameter
Parameter destKey: The destination key.Parameter
Parameter not: The key of the value to be NOT'ed.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func bitop(_ destKey: String, not: String) -> RedisMultiParameters
destKeyThe destination key.
notThe key of the value to be NOT’ed.
Return Value
The
RedisMultiobject being added to. -
Add a BITOP OR command to the
transaction
Parameter
Parameter destKey: The destination key.Parameter
Parameter or: The list of keys whose values will be OR'ed.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func bitop(_ destKey: String, or: String...) -> RedisMultiParameters
destKeyThe destination key.
orThe list of keys whose values will be OR’ed.
Return Value
The
RedisMultiobject being added to. -
Add a BITOP XOR command to the
transaction
Parameter
Parameter destKey: The destination key.Parameter
Parameter xor: The list of keys whose values will be XOR'ed.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func bitop(_ destKey: String, xor: String...) -> RedisMultiParameters
destKeyThe destination key.
xorThe list of keys whose values will be XOR’ed.
Return Value
The
RedisMultiobject being added to. -
Add a BITPOS command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter bit: The value to compare against.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func bitpos(_ key: String, bit: Bool) -> RedisMultiParameters
keyThe key.
bitThe value to compare against.
Return Value
The
RedisMultiobject being added to. -
Add a BITPOS command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter bit: The value to compare against.Parameter
Parameter start: The starting index in the string to search from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func bitpos(_ key: String, bit: Bool, start: Int) -> RedisMultiParameters
keyThe key.
bitThe value to compare against.
startThe starting index in the string to search from.
Return Value
The
RedisMultiobject being added to. -
Add a BITPOS command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter bit: The value to compare against.Parameter
Parameter start: The starting index in the string to search from.Parameter
Parameter end: The ending index in the string to search until.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func bitpos(_ key: String, bit: Bool, start: Int, end: Int) -> RedisMultiParameters
keyThe key.
bitThe value to compare against.
startThe starting index in the string to search from.
endThe ending index in the string to search until.
Return Value
The
RedisMultiobject being added to. -
Add a DECRBY command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter by: An integer number that will be subtracted from the value at the key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func decr(_ key: String, by: Int=1) -> RedisMultiParameters
keyThe key.
byAn integer number that will be subtracted from the value at the key.
Return Value
The
RedisMultiobject being added to. -
Add a DEL command to the
transaction
Parameter
Parameter keys: A list of keys.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func del(_ keys: String...) -> RedisMultiParameters
keysA list of keys.
Return Value
The
RedisMultiobject being added to. -
Add an EXISTS command to the
transaction
Parameter
Parameter keys: A list of keys.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func exists(_ keys: String...) -> RedisMultiParameters
keysA list of keys.
Return Value
The
RedisMultiobject being added to. -
Add a PEXPIRE command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter inTime: The expiration period as a number of milliseconds.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func expire(_ key: String, inTime: TimeInterval) -> RedisMultiParameters
keyThe key.
inTimeThe expiration period as a number of milliseconds.
Return Value
The
RedisMultiobject being added to. -
Add a PEXPIREAT command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter atDate: The key’s expiration specified as a timestamp.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func expire(_ key: String, atDate: NSDate) -> RedisMultiParameters
keyThe key.
atDateThe key’s expiration specified as a timestamp.
Return Value
The
RedisMultiobject being added to. -
Add a GET command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func get(_ key: String) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a GETBIT command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter offset: The offset in the string value.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func getbit(_ key: String, offset: Int) -> RedisMultiParameters
keyThe key.
offsetThe offset in the string value.
Return Value
The
RedisMultiobject being added to. -
Add a GETRANGE command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter start: Integer index for the starting position of the substring.Parameter
Parameter end: Integer index for the ending position of the substring.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func getrange(_ key: String, start: Int, end: Int) -> RedisMultiParameters
keyThe key.
startInteger index for the starting position of the substring.
endInteger index for the ending position of the substring.
Return Value
The
RedisMultiobject being added to. -
Add a GETSET command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter value: The String value to set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func getSet(_ key: String, value: String) -> RedisMultiParameters
keyThe key.
valueThe String value to set.
Return Value
The
RedisMultiobject being added to. -
Add a GETSET command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter value: The
RedisStringvalue to set.Returns
The
RedisMultiobject being added to.Declaration
Swift
public func getSet(_ key: String, value: RedisString) -> RedisMultiParameters
keyThe key.
valueThe
RedisStringvalue to set.Return Value
The
RedisMultiobject being added to. -
Add an INCRBY command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter by: number that will be added to the value at the key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func incr(_ key: String, by: Int=1) -> RedisMultiParameters
keyThe key.
bynumber that will be added to the value at the key.
Return Value
The
RedisMultiobject being added to. -
Add an INCRBYFLOAT command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter byFloat: A floating point number that will be added to the value at the key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func incr(_ key: String, byFloat: Float) -> RedisMultiParameters
keyThe key.
byFloatA floating point number that will be added to the value at the key.
Return Value
The
RedisMultiobject being added to. -
Add a MGET command to the
transaction
Parameter
Parameter keys: The list of keys.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func mget(_ keys: String...) -> RedisMultiParameters
keysThe list of keys.
Return Value
The
RedisMultiobject being added to. -
Add a MOVE command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter toDB: The number of the database to move the key to.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func move(_ key: String, toDB: Int) -> RedisMultiParameters
keyThe key.
toDBThe number of the database to move the key to.
Return Value
The
RedisMultiobject being added to. -
Add a MSET or a MSETNX command to the
transaction
Parameter
Parameter keyValuePairs: A list of tuples containing a key and a value.Parameter
Parameter exists: If true, will set the value only if the key already exists.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func mset(_ keyValuePairs: (String, String)..., exists: Bool=true) -> RedisMultiParameters
keyValuePairsA list of tuples containing a key and a value.
existsIf true, will set the value only if the key already exists.
Return Value
The
RedisMultiobject being added to. -
Add a MSET or a MSETNX command to the
transaction
Parameter
Parameter keyValuePairs: An array of tuples containing a key and a value.Parameter
Parameter exists: If true, will set the value only if the key already exists.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func msetArrayOfKeyValues(_ keyValuePairs: [(String, String)], exists: Bool=true) -> RedisMultiParameters
keyValuePairsAn array of tuples containing a key and a value.
existsIf true, will set the value only if the key already exists.
Return Value
The
RedisMultiobject being added to. -
Add a MSET or a MSETNX command to the
transaction
Parameter
Parameter keyValuePairs: A list of tuples containing a key and a value in the form of aRedisString.Parameter
Parameter exists: If true, will set the value only if the key already exists.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func mset(_ keyValuePairs: (String, RedisString)..., exists: Bool=true) -> RedisMultiParameters
keyValuePairsA list of tuples containing a key and a value in the form of a
RedisString.existsIf true, will set the value only if the key already exists.
Return Value
The
RedisMultiobject being added to. -
Add a MSET or a MSETNX command to the
transaction
Parameter
Parameter keyValuePairs: An array of tuples containing a key and a value in the form of aRedisString.Parameter
Parameter exists: If true, will set the value only if the key already exists.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func msetArrayOfKeyValues(_ keyValuePairs: [(String, RedisString)], exists: Bool=true) -> RedisMultiParameters
keyValuePairsAn array of tuples containing a key and a value in the form of a
RedisString.existsIf true, will set the value only if the key already exists.
Return Value
The
RedisMultiobject being added to. -
Add a PERSIST command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func persist(_ key: String) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a RENAME or a RENAMENX command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter newKey: The new name for the key.Parameter
Parameter exists: If true, will rename the key even if the newKey already exists.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func rename(_ key: String, newKey: String, exists: Bool=true) -> RedisMultiParameters
keyThe key.
newKeyThe new name for the key.
existsIf true, will rename the key even if the newKey already exists.
Return Value
The
RedisMultiobject being added to. -
Add a SELECT command to the
transaction
Parameter
Parameter db: numeric index for the database.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func select(_ db: Int) -> RedisMultiParameters
dbnumeric index for the database.
Return Value
The
RedisMultiobject being added to. -
Add a SET command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter value: The String value to set.Parameter
Parameter exists: If true will only set the key if it already exists.Parameter
Parameter expiresIn: If not nil, the expiration time, in milliseconds.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func set(_ key: String, value: String, exists: Bool?=nil, expiresIn: TimeInterval?=nil) -> RedisMultiParameters
keyThe key.
valueThe String value to set.
existsIf true will only set the key if it already exists.
expiresInIf not nil, the expiration time, in milliseconds.
Return Value
The
RedisMultiobject being added to. -
Add a SET command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter value: TheRedisStringvalue to set.Parameter
Parameter exists: If true will only set the key if it already exists.Parameter
Parameter expiresIn: If not nil, the expiration time, in milliseconds.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func set(_ key: String, value: RedisString, exists: Bool?=nil, expiresIn: TimeInterval?=nil) -> RedisMultiParameters
keyThe key.
valueThe
RedisStringvalue to set.existsIf true will only set the key if it already exists.
expiresInIf not nil, the expiration time, in milliseconds.
Return Value
The
RedisMultiobject being added to. -
Add a SETBIT command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter offset: The offset in the string value.Parameter
Parameter value: The bit value to set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func setbit(_ key: String, offset: Int, value: Bool) -> RedisMultiParameters
keyThe key.
offsetThe offset in the string value.
valueThe bit value to set.
Return Value
The
RedisMultiobject being added to. -
Add a SETRANGE command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter offset: Integer index for the starting position within the key’s value to overwrite.Parameter
Parameter value: The String value to overwrite the value of the key with.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func setrange(_ key: String, offset: Int, value: String) -> RedisMultiParameters
keyThe key.
offsetInteger index for the starting position within the key’s value to overwrite.
valueThe String value to overwrite the value of the key with.
Return Value
The
RedisMultiobject being added to. -
Add a STRLEN command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func strlen(_ key: String) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a PTTL command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func ttl(_ key: String) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to.
-
Add a HDEL command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter fields: The list of fields to remove.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hdel(_ key: String, fields: String...) -> RedisMultiParameters
keyThe key.
fieldsThe list of fields to remove.
Return Value
The
RedisMultiobject being added to. -
Add a HEXISTS command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter field: The field.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hexists(_ key: String, field: String) -> RedisMultiParameters
keyThe key.
fieldThe field.
Return Value
The
RedisMultiobject being added to. -
Add a HGET command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter field: The field.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hget(_ key: String, field: String) -> RedisMultiParameters
keyThe key.
fieldThe field.
Return Value
The
RedisMultiobject being added to. -
Add a HGETALL command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hgetall(_ key: String) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a HINCRBY command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter field: The field.Parameter
Parameter by: The value to increment by.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hincr(_ key: String, field: String, by: Int) -> RedisMultiParameters
keyThe key.
fieldThe field.
byThe value to increment by.
Return Value
The
RedisMultiobject being added to. -
Add a HINCRBYFLOAT command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter field: The field.Parameter
Parameter byFloat: The floating point value to increment by.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hincr(_ key: String, field: String, byFloat: Float) -> RedisMultiParameters
keyThe key.
fieldThe field.
byFloatThe floating point value to increment by.
Return Value
The
RedisMultiobject being added to. -
Add a HKEYS command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hkeys(_ key: String) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a HLEN command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hlen(_ key: String) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a HMGET command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter fields: The list of field names.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hmget(_ key: String, fields: String...) -> RedisMultiParameters
keyThe key.
fieldsThe list of field names.
Return Value
The
RedisMultiobject being added to. -
Add a HMSET command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter fieldValuePairs: The list of field name value tuples to set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hmset(_ key: String, fieldValuePairs: (String, String)...) -> RedisMultiParameters
keyThe key.
fieldValuePairsThe list of field name value tuples to set.
Return Value
The
RedisMultiobject being added to. -
Add a HMSET command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter fieldValuePairs: The array of field name value tuples to set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hmsetArrayOfKeyValues(_ key: String, fieldValuePairs: [(String, String)]) -> RedisMultiParameters
keyThe key.
fieldValuePairsThe array of field name value tuples to set.
Return Value
The
RedisMultiobject being added to. -
Add a HMSET command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter fieldValuePairs: The list of field name value tuples to set. With values as
RedisStrings.Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hmset(_ key: String, fieldValuePairs: (String, RedisString)...) -> RedisMultiParameters
keyThe key.
fieldValuePairsThe list of field name value tuples to set. With values as
RedisStrings.Return Value
The
RedisMultiobject being added to. -
Add a HMSET command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter fieldValuePairs: The array of field name value tuples to set. With values as
RedisStrings.Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hmsetArrayOfKeyValues(_ key: String, fieldValuePairs: [(String, RedisString)]) -> RedisMultiParameters
keyThe key.
fieldValuePairsThe array of field name value tuples to set. With values as
RedisStrings.Return Value
The
RedisMultiobject being added to. -
Add a HSET or a HSETNX command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter field: The name of the field name to set.Parameter
Parameter value: The value to set the field to.Parameter
Parameter exists: If true, will set the value only if the field exists.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hset(_ key: String, field: String, value: String, exists: Bool=true) -> RedisMultiParameters
keyThe key.
fieldThe name of the field name to set.
valueThe value to set the field to.
existsIf true, will set the value only if the field exists.
Return Value
The
RedisMultiobject being added to. -
Add a HSET or a HSETNX command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter field: The name of the field name to set.Parameter
Parameter value: The value in the form of aRedisStringto set the field to.Parameter
Parameter exists: If true, will set the value only if the field exists.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hset(_ key: String, field: String, value: RedisString, exists: Bool=true) -> RedisMultiParameters
keyThe key.
fieldThe name of the field name to set.
valueThe value in the form of a
RedisStringto set the field to.existsIf true, will set the value only if the field exists.
Return Value
The
RedisMultiobject being added to. -
Add a HSTRLEN command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter field: The name of the field.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hstrlen(_ key: String, field: String) -> RedisMultiParameters
keyThe key.
fieldThe name of the field.
Return Value
The
RedisMultiobject being added to. -
Add a HVALS command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func hvals(_ key: String) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to.
-
Add a SADD command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter members: The values to be added to the set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sadd(_ key: String, members: String...) -> RedisMultiParameters
keyThe key.
membersThe values to be added to the set.
Return Value
The
RedisMultiobject being added to. -
Add a SADD command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter members: An array of values to be added to the set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func saddArrayOfMembers(_ key: String, members: [String]) -> RedisMultiParameters
keyThe key.
membersAn array of values to be added to the set.
Return Value
The
RedisMultiobject being added to. -
Add a SADD command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter members: The
RedisStringvalues to be added to the set.Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sadd(_ key: RedisString, members: RedisString...) -> RedisMultiParameters
keyThe key.
membersThe
RedisStringvalues to be added to the set.Return Value
The
RedisMultiobject being added to. -
Add a SADD command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter members: An array of
RedisStringvalues to be added to the set.Returns
The
RedisMultiobject being added to.Declaration
Swift
public func saddArrayOfMembers(_ key: RedisString, members: [RedisString]) -> RedisMultiParameters
keyThe key.
membersAn array of
RedisStringvalues to be added to the set.Return Value
The
RedisMultiobject being added to. -
Add a SCARD command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func scard(_ key: String) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a SCARD command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func scard(_ key: RedisString) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a SDIFF command to the
transaction
Parameter
Parameter keys: The list of keys to get the difference from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sdiff(keys: String...) -> RedisMultiParameters
keysThe list of keys to get the difference from.
Return Value
The
RedisMultiobject being added to. -
Add a SDIFF command to the
transaction
Parameter
Parameter keys: An array of the keys to get the difference from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sdiffArrayOfKeys(keys: [String]) -> RedisMultiParameters
keysAn array of the keys to get the difference from.
Return Value
The
RedisMultiobject being added to. -
Add a SDIFF command to the
transaction
Parameter
Parameter keys: The list of the keys to get the difference from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sdiff(keys: RedisString...) -> RedisMultiParameters
keysThe list of the keys to get the difference from.
Return Value
The
RedisMultiobject being added to. -
Add a SDIFF command to the
transaction
Parameter
Parameter keys: An array of the keys to get the difference from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sdiffArrayOfKeys(keys: [RedisString]) -> RedisMultiParameters
keysAn array of the keys to get the difference from.
Return Value
The
RedisMultiobject being added to. -
Add a SDIFF command to the
transaction
Parameter
Parameter destination: The destination of the result, if the destination already exists, it is overwrittenParameter
Parameter keys: The list of the keys to get the difference from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sdiffstore(destination: String, keys: String...) -> RedisMultiParameters
destinationThe destination of the result, if the destination already exists, it is overwritten
keysThe list of the keys to get the difference from.
Return Value
The
RedisMultiobject being added to. -
Add a SDIFFSTORE command to the
transaction
Parameter
Parameter destination: The destination of the result.Parameter
Parameter keys: An array of the keys to get the difference from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sdiffstoreArrayOfKeys(destination: String, keys: [String]) -> RedisMultiParameters
destinationThe destination of the result.
keysAn array of the keys to get the difference from.
Return Value
The
RedisMultiobject being added to. -
Add a SDIFFSTORE command to the
transaction
Parameter
Parameter destination: The destination of the result, if the destination already exists, it is overwrittenParameter
Parameter keys: The list of the keys to get the difference from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sdiffstore(destination: RedisString, keys: RedisString...) -> RedisMultiParameters
destinationThe destination of the result, if the destination already exists, it is overwritten
keysThe list of the keys to get the difference from.
Return Value
The
RedisMultiobject being added to. -
Add a SDIFFSTORE command to the
transaction
Parameter
Parameter destination: Tthe destination of the result.Parameter
Parameter keys: An array of keys to get the difference from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sdiffstoreArrayOfKeys(destination: RedisString, keys: [RedisString]) -> RedisMultiParameters
destinationTthe destination of the result.
keysAn array of keys to get the difference from.
Return Value
The
RedisMultiobject being added to. -
Add a SMEMBERS command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func smembers(_ key: String) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a SMEMBERS command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func smembers(_ key: RedisString) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a SINTER command to the
transaction
Parameter
Parameter keys: The list of the keys to intersect from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sinter(_ keys: String...) -> RedisMultiParameters
keysThe list of the keys to intersect from.
Return Value
The
RedisMultiobject being added to. -
Add a SINTER command to the
transaction
Parameter
Parameter keys: An array of the keys to intersect from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sinterArrayOfKeys(_ keys: [String]) -> RedisMultiParameters
keysAn array of the keys to intersect from.
Return Value
The
RedisMultiobject being added to. -
Add a SINTER command to the
transaction
Parameter
Parameter keys: The list of the keys to intersect from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sinter(_ keys: RedisString...) -> RedisMultiParameters
keysThe list of the keys to intersect from.
Return Value
The
RedisMultiobject being added to. -
Add a SINTER command to the
transaction
Parameter
Parameter keys: An array of the keys to intersect from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sinterArrayOfKeys(_ keys: [RedisString]) -> RedisMultiParameters
keysAn array of the keys to intersect from.
Return Value
The
RedisMultiobject being added to. -
Add a SINTERSTORE command to the
transaction
Parameter
Parameter destination: The destination of the result.Parameter
Parameter keys: The list of the keys to intersect from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sinterstore(_ destination: String, keys: String...) -> RedisMultiParameters
destinationThe destination of the result.
keysThe list of the keys to intersect from.
Return Value
The
RedisMultiobject being added to. -
Add a SINTERSTORE command to the
transaction
Parameter
Parameter destination: The destination of the result.Parameter
Parameter keys: An array of the keys to intersect from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sinterstoreArrayOfKeys(_ destination: String, keys: [String]) -> RedisMultiParameters
destinationThe destination of the result.
keysAn array of the keys to intersect from.
Return Value
The
RedisMultiobject being added to. -
Add a SINTERSTORE command to the
transaction
Parameter
Parameter destination: The destination of the result.Parameter
Parameter keys: The list of the keys to intersect from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sinterstore(_ destination: RedisString, keys: RedisString...) -> RedisMultiParameters
destinationThe destination of the result.
keysThe list of the keys to intersect from.
Return Value
The
RedisMultiobject being added to. -
Add a SINTERSTORE command to the
transaction
Parameter
Parameter destination: The destination of the result.Parameter
Parameter keys: An array of the keys to intersect from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sinterstoreArrayOfKeys(_ destination: RedisString, keys: [RedisString]) -> RedisMultiParameters
destinationThe destination of the result.
keysAn array of the keys to intersect from.
Return Value
The
RedisMultiobject being added to. -
Add a SISMEMBER command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter member: The String parameter for the member.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sismember(_ key: String, member: String) -> RedisMultiParameters
keyThe key.
memberThe String parameter for the member.
Return Value
The
RedisMultiobject being added to. -
Add a SISMEMBER command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter member: The
RedisStringparameter for the member.Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sismember(_ key: RedisString, member: RedisString) -> RedisMultiParameters
keyThe key.
memberThe
RedisStringparameter for the member.Return Value
The
RedisMultiobject being added to. -
Add a SMOVE command to the
transaction
Parameter
Parameter source: The Source set from where to move the member from.Parameter
Parameter destination: The Destination set from where to move the member to.Parameter
Parameter member: The String parameter for the member to be moved.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func smove(source: String, destination: String, member: String) -> RedisMultiParameters
sourceThe Source set from where to move the member from.
destinationThe Destination set from where to move the member to.
memberThe String parameter for the member to be moved.
Return Value
The
RedisMultiobject being added to. -
Add a SMOVE command to the
transaction
Parameter
Parameter source: The Source set from where to move the member from.Parameter
Parameter destination: The Destination set from where to move the member to.Parameter
Parameter member: The RedisString parameter for the member to be moved.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func smove(source: RedisString, destination: RedisString, member: RedisString) -> RedisMultiParameters
sourceThe Source set from where to move the member from.
destinationThe Destination set from where to move the member to.
memberThe RedisString parameter for the member to be moved.
Return Value
The
RedisMultiobject being added to. -
Add a SPOP command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func spop(_ key: String) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a SPOP command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter count: The number of members to pop.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func spop(_ key: String, count: Int) -> RedisMultiParameters
keyThe key.
countThe number of members to pop.
Return Value
The
RedisMultiobject being added to. -
Add a SPOP command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func spop(_ key: RedisString) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a SPOP command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter count: The number of members to pop.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func spop(_ key: RedisString, count: Int) -> RedisMultiParameters
keyThe key.
countThe number of members to pop.
Return Value
The
RedisMultiobject being added to. -
Add a SRANDMEMBER command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func srandmember(_ key: String) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a SRANDMEMBER command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter count: The number of members to return.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func srandmember(_ key: String, count: Int) -> RedisMultiParameters
keyThe key.
countThe number of members to return.
Return Value
The
RedisMultiobject being added to. -
Get a random member from a set
Parameter
Parameter key: The key.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func srandmember(_ key: RedisString) -> RedisMultiParameters
keyThe key.
Return Value
The
RedisMultiobject being added to. -
Add a SRANDMEMBER command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter count: The number of members to return.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func srandmember(_ key: RedisString, count: Int) -> RedisMultiParameters
keyThe key.
countThe number of members to return.
Return Value
The
RedisMultiobject being added to. -
Add a SREM command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter members: The list of the members to be removed.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func srem(_ key: String, members: String...) -> RedisMultiParameters
keyThe key.
membersThe list of the members to be removed.
Return Value
The
RedisMultiobject being added to. -
Add a SREM command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter members: An Array of the members to be removed.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sremArrayOfMembers(_ key: String, members: [String]) -> RedisMultiParameters
keyThe key.
membersAn Array of the members to be removed.
Return Value
The
RedisMultiobject being added to. -
Add a SREM command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter members: The list of the members to be removed.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func srem(_ key: RedisString, members: RedisString...) -> RedisMultiParameters
keyThe key.
membersThe list of the members to be removed.
Return Value
The
RedisMultiobject being added to. -
Add a SREM command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter members: An array of the members to be removed.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sremArrayOfMembers(_ key: RedisString, members: [RedisString]) -> RedisMultiParameters
keyThe key.
membersAn array of the members to be removed.
Return Value
The
RedisMultiobject being added to. -
Add a SUNION command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sunion(_ keys: String...) -> RedisMultiParameters
keysThe list of the keys to union.
Return Value
The
RedisMultiobject being added to. -
Add a SUNION command to the
transaction
Parameter
Parameter keys: An array of the keys to union.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sunionArrayOfKeys(_ keys: [String]) -> RedisMultiParameters
keysAn array of the keys to union.
Return Value
The
RedisMultiobject being added to. -
Add a SUNION command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sunion(_ keys: RedisString...) -> RedisMultiParameters
keysThe list of the keys to union.
Return Value
The
RedisMultiobject being added to. -
Add a SUNION command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sunionArrayOfKeys(_ keys: [RedisString]) -> RedisMultiParameters
keysThe list of the keys to union.
Return Value
The
RedisMultiobject being added to. -
Add a SUNIONSTORE command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sunionstore(_ destination: String, keys: String...) -> RedisMultiParameters
keysThe list of the keys to union.
Return Value
The
RedisMultiobject being added to. -
Add a SUNIONSTORE command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sunionstoreArrayOfKeys(_ destination: String, keys: [String]) -> RedisMultiParameters
keysThe list of the keys to union.
Return Value
The
RedisMultiobject being added to. -
Add a SUNIONSTORE command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sunionstore(_ destination: RedisString, keys: RedisString...) -> RedisMultiParameters
keysThe list of the keys to union.
Return Value
The
RedisMultiobject being added to. -
Add a SUNIONSTORE command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func sunionstoreArrayOfKeys(_ destination: RedisString, keys: [RedisString]) -> RedisMultiParameters
keysThe list of the keys to union.
Return Value
The
RedisMultiobject being added to. -
Add a SSCAN command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter cursor: iteratorParameter
Parameter match: glob-style patternReturns
The
RedisMultiobject being added to.Declaration
Swift
public func sscan(_ key: String, cursor: Int, match: String? = nil, count: Int? = nil) -> RedisMultiParameters
keyThe key.
cursoriterator
matchglob-style pattern
countThe amount of work that should be done at every call in order to retrieve elements from the collection.
Return Value
The
RedisMultiobject being added to. -
Add a SSCAN command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter cursor: iteratorParameter
Parameter match: glob-style patternReturns
The
RedisMultiobject being added to.Declaration
Swift
public func sscan(_ key: RedisString, cursor: Int, match: RedisString? = nil, count: Int? = nil) -> RedisMultiParameters
keyThe key.
cursoriterator
matchglob-style pattern
countThe amount of work that should be done at every call in order to retrieve elements from the collection.
Return Value
The
RedisMultiobject being added to.
-
Add an ZADD command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter tuples: A list of tuples containing a score and value to be added to the sorted set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zadd(_ key: String, tuples: (Int, String)...) -> RedisMultiParameters
keyThe key.
tuplesA list of tuples containing a score and value to be added to the sorted set.
Return Value
The
RedisMultiobject being added to. -
Add an ZADD command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter tuples: A list of tuples containing a score and value to be added to the sorted set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zaddArrayOfScoreMembers(_ key: String, tuples: [(Int, String)]) -> RedisMultiParameters
keyThe key.
tuplesA list of tuples containing a score and value to be added to the sorted set.
Return Value
The
RedisMultiobject being added to. -
Add an ZADD command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter tuples: A list of tuples containing a score and value to be added to the sorted set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zadd(_ key: String, tuples: (Int, RedisString)...) -> RedisMultiParameters
keyThe key.
tuplesA list of tuples containing a score and value to be added to the sorted set.
Return Value
The
RedisMultiobject being added to. -
Add an ZADD command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter tuples: A list of tuples containing a score and value to be added to the sorted set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zaddArrayOfScoreMembers(_ key: String, tuples: [(Int, RedisString)]) -> RedisMultiParameters
keyThe key.
tuplesA list of tuples containing a score and value to be added to the sorted set.
Return Value
The
RedisMultiobject being added to. -
Add an ZCARD command to the
transactions
Parameter
Parameter key: The key.Declaration
Swift
public func zcard(_ key: String) -> RedisMultiParameters
keyThe key.
-
Add an ZCOUNT command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter min: The minimum score to count from the set.Parameter
Parameter max: The maximum score to count from the set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zcount(_ key: String, min: String, max: String) -> RedisMultiParameters
keyThe key.
minThe minimum score to count from the set.
maxThe maximum score to count from the set.
Return Value
The
RedisMultiobject being added to. -
Add an ZINCRBY command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter increment: The amount to increment the member by.Parameter
Parameter member: The member to increment.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zincrby(_ key: String, increment: Int, member: String) -> RedisMultiParameters
keyThe key.
incrementThe amount to increment the member by.
memberThe member to increment.
Return Value
The
RedisMultiobject being added to. -
Add an ZINCRBY command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter increment: The amount to increment the member by.Parameter
Parameter member: The member to increment.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zincrby(_ key: String, increment: Int, member: RedisString) -> RedisMultiParameters
keyThe key.
incrementThe amount to increment the member by.
memberThe member to increment.
Return Value
The
RedisMultiobject being added to. -
Add an ZINTERSTORE command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter increment: The amount to increment the member by.Parameter
Parameter member: The member to increment.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zinterstore(_ destination: String, numkeys: Int, keys: String..., weights: [Int] = [], aggregate: String = "") -> RedisMultiParameters
keyThe key.
incrementThe amount to increment the member by.
memberThe member to increment.
Return Value
The
RedisMultiobject being added to. -
Add an ZLEXCOUNT command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter min: The minimum score to count from the set.Parameter
Parameter max: The maximum score to count from the set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zlexcount(_ key: String, min: String, max: String) -> RedisMultiParameters
keyThe key.
minThe minimum score to count from the set.
maxThe maximum score to count from the set.
Return Value
The
RedisMultiobject being added to. -
Add an ZRANGE command to the
transactions
- Parameter key: The key. - Parameter increment: The amount to increment the member by. - Parameter member: The member to increment.Returns
TheRedisMultiobject being added to.Declaration
Swift
public func zrange(_ key: String, start: Int, stop: Int) -> RedisMultiParameters
keyThe key.
incrementThe amount to increment the member by.
memberThe member to increment.
Return Value
The
RedisMultiobject being added to. -
Add an ZRANGEBYLEX command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter min: The minimum score to count from the set.Parameter
Parameter max: The maximum score to count from the set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zrangebylex(_ key: String, min: String, max: String) -> RedisMultiParameters
keyThe key.
minThe minimum score to count from the set.
maxThe maximum score to count from the set.
Return Value
The
RedisMultiobject being added to. -
Add an ZRANGEBYSCORE command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter min: The minimum score to count from the set.Parameter
Parameter max: The maximum score to count from the set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zrangebyscore(_ key: String, min: String, max: String) -> RedisMultiParameters
keyThe key.
minThe minimum score to count from the set.
maxThe maximum score to count from the set.
Return Value
The
RedisMultiobject being added to. -
Add an ZRANK command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter member: The member to get the rank of.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zrank(_ key: String, member: String) -> RedisMultiParameters
keyThe key.
memberThe member to get the rank of.
Return Value
The
RedisMultiobject being added to. -
Add an ZREM command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter members: The list of the member(s) to remove.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zrem(_ key: String, members: String...) -> RedisMultiParameters
keyThe key.
membersThe list of the member(s) to remove.
Return Value
The
RedisMultiobject being added to. -
Add an ZREM command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter members: The list of the member(s) to remove.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zremArrayOfMembers(_ key: String, members: [String]) -> RedisMultiParameters
keyThe key.
membersThe list of the member(s) to remove.
Return Value
The
RedisMultiobject being added to. -
Add an ZREMRANGEBYLEX command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter min: The minimum score to remove from the set.Parameter
Parameter max: The maximum score to remove from the set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zremrangebylex(_ key: String, min: String, max: String) -> RedisMultiParameters
keyThe key.
minThe minimum score to remove from the set.
maxThe maximum score to remove from the set.
Return Value
The
RedisMultiobject being added to. -
Add an ZREMRANGEBYRANK command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter start: The starting index to remove from the set.Parameter
Parameter stop: The ending index to remove from the set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zremrangebyrank(_ key: String, start: Int, stop: Int) -> RedisMultiParameters
keyThe key.
startThe starting index to remove from the set.
stopThe ending index to remove from the set.
Return Value
The
RedisMultiobject being added to. -
Add an ZREMRANGEBYSCORE command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter min: The minimum score to remove from the set.Parameter
Parameter max: The maximum score to remove from the set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zremrangebyscore(_ key: String, min: String, max: String) -> RedisMultiParameters
keyThe key.
minThe minimum score to remove from the set.
maxThe maximum score to remove from the set.
Return Value
The
RedisMultiobject being added to. -
Add an ZREVRANGE command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter start: The starting index to return from the set.Parameter
Parameter stop: The stoping index to return from the set.Parameter
Parameter withscores: Whether or not to return scores as well.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zrevrange(_ key: String, start: Int, stop: Int, withscores: Bool = false) -> RedisMultiParameters
keyThe key.
startThe starting index to return from the set.
stopThe stoping index to return from the set.
withscoresWhether or not to return scores as well.
Return Value
The
RedisMultiobject being added to. -
Add an ZREVRANGEBYLEX command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter min: The minimum score to remove from the set.Parameter
Parameter max: The maximum score to remove from the set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zrevrangebylex(_ key: String, min: String, max: String) -> RedisMultiParameters
keyThe key.
minThe minimum score to remove from the set.
maxThe maximum score to remove from the set.
Return Value
The
RedisMultiobject being added to. -
Add an ZREVRANGEBYSCORE command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter min: The minimum score to remove from the set.Parameter
Parameter max: The maximum score to remove from the set.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zrevrangebyscore(_ key: String, min: String, max: String, withscore: Bool = false) -> RedisMultiParameters
keyThe key.
minThe minimum score to remove from the set.
maxThe maximum score to remove from the set.
Return Value
The
RedisMultiobject being added to. -
Add an ZREVRANK command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter member: The member to get the rank of.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zrevrank(_ key: String, member: String) -> RedisMultiParameters
keyThe key.
memberThe member to get the rank of.
Return Value
The
RedisMultiobject being added to. -
Add an ZSCAN command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter cursor: iteratorParameter
Parameter match: glob-style patternReturns
The
RedisMultiobject being added to.Declaration
Swift
public func zscan(_ key: String, cursor: Int, match: String? = nil, count: Int? = nil) -> RedisMultiParameters
keyThe key.
cursoriterator
matchglob-style pattern
countThe amount of work that should be done at every call in order to retrieve elements from the collection.
Return Value
The
RedisMultiobject being added to. -
Add an ZSCORE command to the
transactions
Parameter
Parameter key: The key.Parameter
Parameter member: The member to get the score from.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zscore(_ key: String, member: String) -> RedisMultiParameters
keyThe key.
memberThe member to get the score from.
Return Value
The
RedisMultiobject being added to. -
Add an ZUNIONSTORE command to the
transactions
Parameter
Parameter destination: The destination where the result will be stored.Parameter
Parameter numkeys: The number of keys to union.Parameter
Parameter keys: The keys.Parameter
Parameter weights: A multiplication factor for each input sorted set.Parameter
Parameter aggregate: Specify how the results of the union are aggregated.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zunionstore(_ destination: String, numkeys: Int, keys: String..., weights: [Int] = [], aggregate: String = "") -> RedisMultiParameters
destinationThe destination where the result will be stored.
numkeysThe number of keys to union.
keysThe keys.
weightsA multiplication factor for each input sorted set.
aggregateSpecify how the results of the union are aggregated.
Return Value
The
RedisMultiobject being added to. -
Add an ZUNIONSTORE command to the
transactions
Parameter
Parameter destination: The destination where the result will be stored.Parameter
Parameter numkeys: The number of keys to union.Parameter
Parameter keys: The keys.Parameter
Parameter weights: A multiplication factor for each input sorted set.Parameter
Parameter aggregate: Specify how the results of the union are aggregated.Parameter
Parameter callback: The callback function, the Int will contain the number of elements in the resulting sorted set at destination. NSError will be non-nil if an error occured.
Returns
The
RedisMultiobject being added to.Declaration
Swift
public func zunionstoreWithArray(_ destination: String, numkeys: Int, keys: [String], weights: [Int], aggregate: String) -> RedisMultiParameters
destinationThe destination where the result will be stored.
numkeysThe number of keys to union.
keysThe keys.
weightsA multiplication factor for each input sorted set.
aggregateSpecify how the results of the union are aggregated.
callbackThe callback function, the Int will contain the number of elements in the resulting sorted set at destination. NSError will be non-nil if an error occured.
Return Value
The
RedisMultiobject being added to.
View on GitHub
RedisMulti Class Reference