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 aRedisResponse
Declaration
Swift
public func exec(_ callback: @escaping (RedisResponse) -> Void)
Parameters
callback
a 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
RedisMulti
object being added to.Declaration
Swift
public func append(_ key: String, value: String) -> RedisMulti
Parameters
key
The key.
value
The value to append.
Return Value
The
RedisMulti
object being added to. -
Add a BITCOUNT command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func bitcount(_ key: String) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func bitcount(_ key: String, start: Int, end: Int) -> RedisMulti
Parameters
key
The key.
start
The starting index in the string to count from.
end
The ending index in the string to count to.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func bitop(_ destKey: String, and: String...) -> RedisMulti
Parameters
destKey
The destination key.
and
The list of keys whose values will be AND’ed.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func bitop(_ destKey: String, not: String) -> RedisMulti
Parameters
destKey
The destination key.
not
The key of the value to be NOT’ed.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func bitop(_ destKey: String, or: String...) -> RedisMulti
Parameters
destKey
The destination key.
or
The list of keys whose values will be OR’ed.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func bitop(_ destKey: String, xor: String...) -> RedisMulti
Parameters
destKey
The destination key.
xor
The list of keys whose values will be XOR’ed.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func bitpos(_ key: String, bit: Bool) -> RedisMulti
Parameters
key
The key.
bit
The value to compare against.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func bitpos(_ key: String, bit: Bool, start: Int) -> RedisMulti
Parameters
key
The key.
bit
The value to compare against.
start
The starting index in the string to search from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func bitpos(_ key: String, bit: Bool, start: Int, end: Int) -> RedisMulti
Parameters
key
The key.
bit
The value to compare against.
start
The starting index in the string to search from.
end
The ending index in the string to search until.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func decr(_ key: String, by: Int=1) -> RedisMulti
Parameters
key
The key.
by
An integer number that will be subtracted from the value at the key.
Return Value
The
RedisMulti
object being added to. -
Add a DEL command to the
transaction
Parameter
Parameter keys: A list of keys.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func del(_ keys: String...) -> RedisMulti
Parameters
keys
A list of keys.
Return Value
The
RedisMulti
object being added to. -
Add an EXISTS command to the
transaction
Parameter
Parameter keys: A list of keys.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func exists(_ keys: String...) -> RedisMulti
Parameters
keys
A list of keys.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func expire(_ key: String, inTime: TimeInterval) -> RedisMulti
Parameters
key
The key.
inTime
The expiration period as a number of milliseconds.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func expire(_ key: String, atDate: NSDate) -> RedisMulti
Parameters
key
The key.
atDate
The key’s expiration specified as a timestamp.
Return Value
The
RedisMulti
object being added to. -
Add a GET command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func get(_ key: String) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func getbit(_ key: String, offset: Int) -> RedisMulti
Parameters
key
The key.
offset
The offset in the string value.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func getrange(_ key: String, start: Int, end: Int) -> RedisMulti
Parameters
key
The key.
start
Integer index for the starting position of the substring.
end
Integer index for the ending position of the substring.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func getSet(_ key: String, value: String) -> RedisMulti
Parameters
key
The key.
value
The String value to set.
Return Value
The
RedisMulti
object being added to. -
Add a GETSET command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter value: The
RedisString
value to set.Returns
The
RedisMulti
object being added to.Declaration
Swift
public func getSet(_ key: String, value: RedisString) -> RedisMulti
Parameters
key
The key.
value
The
RedisString
value to set.Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func incr(_ key: String, by: Int=1) -> RedisMulti
Parameters
key
The key.
by
number that will be added to the value at the key.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func incr(_ key: String, byFloat: Float) -> RedisMulti
Parameters
key
The key.
byFloat
A floating point number that will be added to the value at the key.
Return Value
The
RedisMulti
object being added to. -
Add a MGET command to the
transaction
Parameter
Parameter keys: The list of keys.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func mget(_ keys: String...) -> RedisMulti
Parameters
keys
The list of keys.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func move(_ key: String, toDB: Int) -> RedisMulti
Parameters
key
The key.
toDB
The number of the database to move the key to.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func mset(_ keyValuePairs: (String, String)..., exists: Bool=true) -> RedisMulti
Parameters
keyValuePairs
A list of tuples containing a key and a value.
exists
If true, will set the value only if the key already exists.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func msetArrayOfKeyValues(_ keyValuePairs: [(String, String)], exists: Bool=true) -> RedisMulti
Parameters
keyValuePairs
An array of tuples containing a key and a value.
exists
If true, will set the value only if the key already exists.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func mset(_ keyValuePairs: (String, RedisString)..., exists: Bool=true) -> RedisMulti
Parameters
keyValuePairs
A list of tuples containing a key and a value in the form of a
RedisString
.exists
If true, will set the value only if the key already exists.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func msetArrayOfKeyValues(_ keyValuePairs: [(String, RedisString)], exists: Bool=true) -> RedisMulti
Parameters
keyValuePairs
An array of tuples containing a key and a value in the form of a
RedisString
.exists
If true, will set the value only if the key already exists.
Return Value
The
RedisMulti
object being added to. -
Add a PERSIST command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func persist(_ key: String) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func rename(_ key: String, newKey: String, exists: Bool=true) -> RedisMulti
Parameters
key
The key.
newKey
The new name for the key.
exists
If true, will rename the key even if the newKey already exists.
Return Value
The
RedisMulti
object being added to. -
Add a SELECT command to the
transaction
Parameter
Parameter db: numeric index for the database.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func select(_ db: Int) -> RedisMulti
Parameters
db
numeric index for the database.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func set(_ key: String, value: String, exists: Bool?=nil, expiresIn: TimeInterval?=nil) -> RedisMulti
Parameters
key
The key.
value
The String value to set.
exists
If true will only set the key if it already exists.
expiresIn
If not nil, the expiration time, in milliseconds.
Return Value
The
RedisMulti
object being added to. -
Add a SET command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter value: TheRedisString
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
RedisMulti
object being added to.Declaration
Swift
public func set(_ key: String, value: RedisString, exists: Bool?=nil, expiresIn: TimeInterval?=nil) -> RedisMulti
Parameters
key
The key.
value
The
RedisString
value to set.exists
If true will only set the key if it already exists.
expiresIn
If not nil, the expiration time, in milliseconds.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func setbit(_ key: String, offset: Int, value: Bool) -> RedisMulti
Parameters
key
The key.
offset
The offset in the string value.
value
The bit value to set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func setrange(_ key: String, offset: Int, value: String) -> RedisMulti
Parameters
key
The key.
offset
Integer index for the starting position within the key’s value to overwrite.
value
The String value to overwrite the value of the key with.
Return Value
The
RedisMulti
object being added to. -
Add a STRLEN command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func strlen(_ key: String) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object being added to. -
Add a PTTL command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func ttl(_ key: String) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func hdel(_ key: String, fields: String...) -> RedisMulti
Parameters
key
The key.
fields
The list of fields to remove.
Return Value
The
RedisMulti
object being added to. -
Add a HEXISTS command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter field: The field.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func hexists(_ key: String, field: String) -> RedisMulti
Parameters
key
The key.
field
The field.
Return Value
The
RedisMulti
object being added to. -
Add a HGET command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter field: The field.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func hget(_ key: String, field: String) -> RedisMulti
Parameters
key
The key.
field
The field.
Return Value
The
RedisMulti
object being added to. -
Add a HGETALL command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func hgetall(_ key: String) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func hincr(_ key: String, field: String, by: Int) -> RedisMulti
Parameters
key
The key.
field
The field.
by
The value to increment by.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func hincr(_ key: String, field: String, byFloat: Float) -> RedisMulti
Parameters
key
The key.
field
The field.
byFloat
The floating point value to increment by.
Return Value
The
RedisMulti
object being added to. -
Add a HKEYS command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func hkeys(_ key: String) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object being added to. -
Add a HLEN command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func hlen(_ key: String) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func hmget(_ key: String, fields: String...) -> RedisMulti
Parameters
key
The key.
fields
The list of field names.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func hmset(_ key: String, fieldValuePairs: (String, String)...) -> RedisMulti
Parameters
key
The key.
fieldValuePairs
The list of field name value tuples to set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func hmsetArrayOfKeyValues(_ key: String, fieldValuePairs: [(String, String)]) -> RedisMulti
Parameters
key
The key.
fieldValuePairs
The array of field name value tuples to set.
Return Value
The
RedisMulti
object 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
RedisString
s.Returns
The
RedisMulti
object being added to.Declaration
Swift
public func hmset(_ key: String, fieldValuePairs: (String, RedisString)...) -> RedisMulti
Parameters
key
The key.
fieldValuePairs
The list of field name value tuples to set. With values as
RedisString
s.Return Value
The
RedisMulti
object 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
RedisString
s.Returns
The
RedisMulti
object being added to.Declaration
Swift
public func hmsetArrayOfKeyValues(_ key: String, fieldValuePairs: [(String, RedisString)]) -> RedisMulti
Parameters
key
The key.
fieldValuePairs
The array of field name value tuples to set. With values as
RedisString
s.Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func hset(_ key: String, field: String, value: String, exists: Bool=true) -> RedisMulti
Parameters
key
The key.
field
The name of the field name to set.
value
The value to set the field to.
exists
If true, will set the value only if the field exists.
Return Value
The
RedisMulti
object 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 aRedisString
to set the field to.Parameter
Parameter exists: If true, will set the value only if the field exists.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func hset(_ key: String, field: String, value: RedisString, exists: Bool=true) -> RedisMulti
Parameters
key
The key.
field
The name of the field name to set.
value
The value in the form of a
RedisString
to set the field to.exists
If true, will set the value only if the field exists.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func hstrlen(_ key: String, field: String) -> RedisMulti
Parameters
key
The key.
field
The name of the field.
Return Value
The
RedisMulti
object being added to. -
Add a HVALS command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func hvals(_ key: String) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sadd(_ key: String, members: String...) -> RedisMulti
Parameters
key
The key.
members
The values to be added to the set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func saddArrayOfMembers(_ key: String, members: [String]) -> RedisMulti
Parameters
key
The key.
members
An array of values to be added to the set.
Return Value
The
RedisMulti
object being added to. -
Add a SADD command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter members: The
RedisString
values to be added to the set.Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sadd(_ key: RedisString, members: RedisString...) -> RedisMulti
Parameters
key
The key.
members
The
RedisString
values to be added to the set.Return Value
The
RedisMulti
object being added to. -
Add a SADD command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter members: An array of
RedisString
values to be added to the set.Returns
The
RedisMulti
object being added to.Declaration
Swift
public func saddArrayOfMembers(_ key: RedisString, members: [RedisString]) -> RedisMulti
Parameters
key
The key.
members
An array of
RedisString
values to be added to the set.Return Value
The
RedisMulti
object being added to. -
Add a SCARD command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func scard(_ key: String) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object being added to. -
Add a SCARD command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func scard(_ key: RedisString) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object being added to. -
Add a SDIFF command to the
transaction
Parameter
Parameter keys: The list of keys to get the difference from.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sdiff(keys: String...) -> RedisMulti
Parameters
keys
The list of keys to get the difference from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sdiffArrayOfKeys(keys: [String]) -> RedisMulti
Parameters
keys
An array of the keys to get the difference from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sdiff(keys: RedisString...) -> RedisMulti
Parameters
keys
The list of the keys to get the difference from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sdiffArrayOfKeys(keys: [RedisString]) -> RedisMulti
Parameters
keys
An array of the keys to get the difference from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sdiffstore(destination: String, keys: String...) -> RedisMulti
Parameters
destination
The destination of the result, if the destination already exists, it is overwritten
keys
The list of the keys to get the difference from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sdiffstoreArrayOfKeys(destination: String, keys: [String]) -> RedisMulti
Parameters
destination
The destination of the result.
keys
An array of the keys to get the difference from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sdiffstore(destination: RedisString, keys: RedisString...) -> RedisMulti
Parameters
destination
The destination of the result, if the destination already exists, it is overwritten
keys
The list of the keys to get the difference from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sdiffstoreArrayOfKeys(destination: RedisString, keys: [RedisString]) -> RedisMulti
Parameters
destination
Tthe destination of the result.
keys
An array of keys to get the difference from.
Return Value
The
RedisMulti
object being added to. -
Add a SMEMBERS command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func smembers(_ key: String) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object being added to. -
Add a SMEMBERS command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func smembers(_ key: RedisString) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object being added to. -
Add a SINTER command to the
transaction
Parameter
Parameter keys: The list of the keys to intersect from.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sinter(_ keys: String...) -> RedisMulti
Parameters
keys
The list of the keys to intersect from.
Return Value
The
RedisMulti
object being added to. -
Add a SINTER command to the
transaction
Parameter
Parameter keys: An array of the keys to intersect from.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sinterArrayOfKeys(_ keys: [String]) -> RedisMulti
Parameters
keys
An array of the keys to intersect from.
Return Value
The
RedisMulti
object being added to. -
Add a SINTER command to the
transaction
Parameter
Parameter keys: The list of the keys to intersect from.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sinter(_ keys: RedisString...) -> RedisMulti
Parameters
keys
The list of the keys to intersect from.
Return Value
The
RedisMulti
object being added to. -
Add a SINTER command to the
transaction
Parameter
Parameter keys: An array of the keys to intersect from.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sinterArrayOfKeys(_ keys: [RedisString]) -> RedisMulti
Parameters
keys
An array of the keys to intersect from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sinterstore(_ destination: String, keys: String...) -> RedisMulti
Parameters
destination
The destination of the result.
keys
The list of the keys to intersect from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sinterstoreArrayOfKeys(_ destination: String, keys: [String]) -> RedisMulti
Parameters
destination
The destination of the result.
keys
An array of the keys to intersect from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sinterstore(_ destination: RedisString, keys: RedisString...) -> RedisMulti
Parameters
destination
The destination of the result.
keys
The list of the keys to intersect from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sinterstoreArrayOfKeys(_ destination: RedisString, keys: [RedisString]) -> RedisMulti
Parameters
destination
The destination of the result.
keys
An array of the keys to intersect from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sismember(_ key: String, member: String) -> RedisMulti
Parameters
key
The key.
member
The String parameter for the member.
Return Value
The
RedisMulti
object being added to. -
Add a SISMEMBER command to the
transaction
Parameter
Parameter key: The key.Parameter
Parameter member: The
RedisString
parameter for the member.Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sismember(_ key: RedisString, member: RedisString) -> RedisMulti
Parameters
key
The key.
member
The
RedisString
parameter for the member.Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func smove(source: String, destination: String, member: String) -> RedisMulti
Parameters
source
The Source set from where to move the member from.
destination
The Destination set from where to move the member to.
member
The String parameter for the member to be moved.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func smove(source: RedisString, destination: RedisString, member: RedisString) -> RedisMulti
Parameters
source
The Source set from where to move the member from.
destination
The Destination set from where to move the member to.
member
The RedisString parameter for the member to be moved.
Return Value
The
RedisMulti
object being added to. -
Add a SPOP command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func spop(_ key: String) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func spop(_ key: String, count: Int) -> RedisMulti
Parameters
key
The key.
count
The number of members to pop.
Return Value
The
RedisMulti
object being added to. -
Add a SPOP command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func spop(_ key: RedisString) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func spop(_ key: RedisString, count: Int) -> RedisMulti
Parameters
key
The key.
count
The number of members to pop.
Return Value
The
RedisMulti
object being added to. -
Add a SRANDMEMBER command to the
transaction
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func srandmember(_ key: String) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func srandmember(_ key: String, count: Int) -> RedisMulti
Parameters
key
The key.
count
The number of members to return.
Return Value
The
RedisMulti
object being added to. -
Get a random member from a set
Parameter
Parameter key: The key.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func srandmember(_ key: RedisString) -> RedisMulti
Parameters
key
The key.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func srandmember(_ key: RedisString, count: Int) -> RedisMulti
Parameters
key
The key.
count
The number of members to return.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func srem(_ key: String, members: String...) -> RedisMulti
Parameters
key
The key.
members
The list of the members to be removed.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sremArrayOfMembers(_ key: String, members: [String]) -> RedisMulti
Parameters
key
The key.
members
An Array of the members to be removed.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func srem(_ key: RedisString, members: RedisString...) -> RedisMulti
Parameters
key
The key.
members
The list of the members to be removed.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sremArrayOfMembers(_ key: RedisString, members: [RedisString]) -> RedisMulti
Parameters
key
The key.
members
An array of the members to be removed.
Return Value
The
RedisMulti
object being added to. -
Add a SUNION command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sunion(_ keys: String...) -> RedisMulti
Parameters
keys
The list of the keys to union.
Return Value
The
RedisMulti
object being added to. -
Add a SUNION command to the
transaction
Parameter
Parameter keys: An array of the keys to union.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sunionArrayOfKeys(_ keys: [String]) -> RedisMulti
Parameters
keys
An array of the keys to union.
Return Value
The
RedisMulti
object being added to. -
Add a SUNION command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sunion(_ keys: RedisString...) -> RedisMulti
Parameters
keys
The list of the keys to union.
Return Value
The
RedisMulti
object being added to. -
Add a SUNION command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sunionArrayOfKeys(_ keys: [RedisString]) -> RedisMulti
Parameters
keys
The list of the keys to union.
Return Value
The
RedisMulti
object being added to. -
Add a SUNIONSTORE command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sunionstore(_ destination: String, keys: String...) -> RedisMulti
Parameters
keys
The list of the keys to union.
Return Value
The
RedisMulti
object being added to. -
Add a SUNIONSTORE command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sunionstoreArrayOfKeys(_ destination: String, keys: [String]) -> RedisMulti
Parameters
keys
The list of the keys to union.
Return Value
The
RedisMulti
object being added to. -
Add a SUNIONSTORE command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sunionstore(_ destination: RedisString, keys: RedisString...) -> RedisMulti
Parameters
keys
The list of the keys to union.
Return Value
The
RedisMulti
object being added to. -
Add a SUNIONSTORE command to the
transaction
Parameter
Parameter keys: The list of the keys to union.
Returns
The
RedisMulti
object being added to.Declaration
Swift
public func sunionstoreArrayOfKeys(_ destination: RedisString, keys: [RedisString]) -> RedisMulti
Parameters
keys
The list of the keys to union.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sscan(_ key: String, cursor: Int, match: String? = nil, count: Int? = nil) -> RedisMulti
Parameters
key
The key.
cursor
iterator
match
glob-style pattern
count
The amount of work that should be done at every call in order to retrieve elements from the collection.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func sscan(_ key: RedisString, cursor: Int, match: RedisString? = nil, count: Int? = nil) -> RedisMulti
Parameters
key
The key.
cursor
iterator
match
glob-style pattern
count
The amount of work that should be done at every call in order to retrieve elements from the collection.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zadd(_ key: String, tuples: (Int, String)...) -> RedisMulti
Parameters
key
The key.
tuples
A list of tuples containing a score and value to be added to the sorted set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zaddArrayOfScoreMembers(_ key: String, tuples: [(Int, String)]) -> RedisMulti
Parameters
key
The key.
tuples
A list of tuples containing a score and value to be added to the sorted set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zadd(_ key: String, tuples: (Int, RedisString)...) -> RedisMulti
Parameters
key
The key.
tuples
A list of tuples containing a score and value to be added to the sorted set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zaddArrayOfScoreMembers(_ key: String, tuples: [(Int, RedisString)]) -> RedisMulti
Parameters
key
The key.
tuples
A list of tuples containing a score and value to be added to the sorted set.
Return Value
The
RedisMulti
object being added to. -
Add an ZCARD command to the
transactions
Parameter
Parameter key: The key.Declaration
Swift
public func zcard(_ key: String) -> RedisMulti
Parameters
key
The 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
RedisMulti
object being added to.Declaration
Swift
public func zcount(_ key: String, min: String, max: String) -> RedisMulti
Parameters
key
The key.
min
The minimum score to count from the set.
max
The maximum score to count from the set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zincrby(_ key: String, increment: Int, member: String) -> RedisMulti
Parameters
key
The key.
increment
The amount to increment the member by.
member
The member to increment.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zincrby(_ key: String, increment: Int, member: RedisString) -> RedisMulti
Parameters
key
The key.
increment
The amount to increment the member by.
member
The member to increment.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zinterstore(_ destination: String, numkeys: Int, keys: String..., weights: [Int] = [], aggregate: String = "") -> RedisMulti
Parameters
key
The key.
increment
The amount to increment the member by.
member
The member to increment.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zlexcount(_ key: String, min: String, max: String) -> RedisMulti
Parameters
key
The key.
min
The minimum score to count from the set.
max
The maximum score to count from the set.
Return Value
The
RedisMulti
object 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
TheRedisMulti
object being added to.Declaration
Swift
public func zrange(_ key: String, start: Int, stop: Int) -> RedisMulti
Parameters
key
The key.
increment
The amount to increment the member by.
member
The member to increment.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zrangebylex(_ key: String, min: String, max: String) -> RedisMulti
Parameters
key
The key.
min
The minimum score to count from the set.
max
The maximum score to count from the set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zrangebyscore(_ key: String, min: String, max: String) -> RedisMulti
Parameters
key
The key.
min
The minimum score to count from the set.
max
The maximum score to count from the set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zrank(_ key: String, member: String) -> RedisMulti
Parameters
key
The key.
member
The member to get the rank of.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zrem(_ key: String, members: String...) -> RedisMulti
Parameters
key
The key.
members
The list of the member(s) to remove.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zremArrayOfMembers(_ key: String, members: [String]) -> RedisMulti
Parameters
key
The key.
members
The list of the member(s) to remove.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zremrangebylex(_ key: String, min: String, max: String) -> RedisMulti
Parameters
key
The key.
min
The minimum score to remove from the set.
max
The maximum score to remove from the set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zremrangebyrank(_ key: String, start: Int, stop: Int) -> RedisMulti
Parameters
key
The key.
start
The starting index to remove from the set.
stop
The ending index to remove from the set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zremrangebyscore(_ key: String, min: String, max: String) -> RedisMulti
Parameters
key
The key.
min
The minimum score to remove from the set.
max
The maximum score to remove from the set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zrevrange(_ key: String, start: Int, stop: Int, withscores: Bool = false) -> RedisMulti
Parameters
key
The key.
start
The starting index to return from the set.
stop
The stoping index to return from the set.
withscores
Whether or not to return scores as well.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zrevrangebylex(_ key: String, min: String, max: String) -> RedisMulti
Parameters
key
The key.
min
The minimum score to remove from the set.
max
The maximum score to remove from the set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zrevrangebyscore(_ key: String, min: String, max: String, withscore: Bool = false) -> RedisMulti
Parameters
key
The key.
min
The minimum score to remove from the set.
max
The maximum score to remove from the set.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zrevrank(_ key: String, member: String) -> RedisMulti
Parameters
key
The key.
member
The member to get the rank of.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zscan(_ key: String, cursor: Int, match: String? = nil, count: Int? = nil) -> RedisMulti
Parameters
key
The key.
cursor
iterator
match
glob-style pattern
count
The amount of work that should be done at every call in order to retrieve elements from the collection.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zscore(_ key: String, member: String) -> RedisMulti
Parameters
key
The key.
member
The member to get the score from.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zunionstore(_ destination: String, numkeys: Int, keys: String..., weights: [Int] = [], aggregate: String = "") -> RedisMulti
Parameters
destination
The destination where the result will be stored.
numkeys
The number of keys to union.
keys
The keys.
weights
A multiplication factor for each input sorted set.
aggregate
Specify how the results of the union are aggregated.
Return Value
The
RedisMulti
object 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
RedisMulti
object being added to.Declaration
Swift
public func zunionstoreWithArray(_ destination: String, numkeys: Int, keys: [String], weights: [Int], aggregate: String) -> RedisMulti
Parameters
destination
The destination where the result will be stored.
numkeys
The number of keys to union.
keys
The keys.
weights
A multiplication factor for each input sorted set.
aggregate
Specify how the results of the union are aggregated.
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.
Return Value
The
RedisMulti
object being added to.