p

zio

redis

package redis

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. redis
  2. Scripting
  3. Streams
  4. Lists
  5. Strings
  6. SortedSets
  7. Shared
  8. Keys
  9. Geo
  10. Connection
  11. Scripting
  12. Streams
  13. SortedSets
  14. Strings
  15. Sets
  16. Lists
  17. Keys
  18. HyperLogLog
  19. Hashes
  20. Geo
  21. Connection
  22. AnyRef
  23. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package api
  2. package options

Type Members

  1. type AbsTtl = AbsTtl.type
    Definition Classes
    Keys
  2. type Alpha = Alpha.type
    Definition Classes
    Keys
  3. type Changed = Changed.type
    Definition Classes
    SortedSets
  4. type Copy = Copy.type
    Definition Classes
    Keys
  5. type Id[+A] = A
  6. type Increment = Increment.type
    Definition Classes
    SortedSets
  7. sealed trait Input[-A] extends AnyRef
  8. type KeepTtl = KeepTtl.type
    Definition Classes
    Strings
  9. type MemberScores[+M] = Chunk[MemberScore[M]]
    Definition Classes
    SortedSets
  10. type MkStream = MkStream.type
    Definition Classes
    Streams
  11. type NoAck = NoAck.type
    Definition Classes
    Streams
  12. sealed trait Output[+A] extends AnyRef
  13. trait Redis extends AnyRef
  14. final class RedisCommand[-In, +Out] extends AnyRef
  15. final case class RedisConfig(host: String, port: Int) extends Product with Serializable
  16. sealed trait RedisError extends Throwable with NoStackTrace
  17. trait RedisExecutor extends AnyRef
  18. final case class RedisLive(codec: Codec, executor: RedisExecutor) extends Redis with Product with Serializable
  19. type Replace = Replace.type
    Definition Classes
    Keys
  20. sealed trait RespValue extends Product with Serializable
  21. sealed trait ResultBuilder extends AnyRef
  22. type StreamChunks[N, I, K, V] = Chunk[StreamChunk[N, I, K, V]]
    Definition Classes
    Streams
  23. type StreamEntries[I, K, V] = Chunk[StreamEntry[I, K, V]]
    Definition Classes
    Streams
  24. type WithCoord = WithCoord.type
    Definition Classes
    Geo
  25. type WithDist = WithDist.type
    Definition Classes
    Geo
  26. type WithForce = WithForce.type
    Definition Classes
    Streams
  27. type WithHash = WithHash.type
    Definition Classes
    Geo
  28. type WithJustId = WithJustId.type
    Definition Classes
    Streams
  29. type WithScores = WithScores.type
    Definition Classes
    SortedSets
  30. sealed case class Address(ip: InetAddress, port: Int) extends Product with Serializable
    Definition Classes
    Connection
  31. sealed case class ClientEvents(readable: Boolean = false, writable: Boolean = false) extends Product with Serializable
    Definition Classes
    Connection
  32. sealed trait ClientFlag extends AnyRef
    Definition Classes
    Connection
  33. sealed case class ClientInfo(id: Long, name: Option[String] = None, address: Option[Address] = None, localAddress: Option[Address] = None, fileDescriptor: Option[Long] = None, age: Option[zio.Duration] = None, idle: Option[zio.Duration] = None, flags: Set[ClientFlag] = Set.empty, databaseId: Option[Long] = None, subscriptions: Int = 0, patternSubscriptions: Int = 0, multiCommands: Int = 0, queryBufferLength: Option[Int] = None, queryBufferFree: Option[Int] = None, outputBufferLength: Option[Int] = None, outputListLength: Option[Int] = None, outputBufferMem: Option[Long] = None, events: ClientEvents = ClientEvents(), lastCommand: Option[String] = None, argvMemory: Option[Long] = None, totalMemory: Option[Long] = None, redirectionClientId: Option[Long] = None, user: Option[String] = None) extends Product with Serializable
    Definition Classes
    Connection
  34. sealed trait ClientKillFilter extends AnyRef
    Definition Classes
    Connection
  35. sealed trait ClientPauseMode extends AnyRef
    Definition Classes
    Connection
  36. sealed case class ClientTrackingFlags(clientSideCaching: Boolean, trackingMode: Option[ClientTrackingMode] = None, noLoop: Boolean = false, caching: Option[Boolean] = None, brokenRedirect: Boolean = false) extends Product with Serializable
    Definition Classes
    Connection
  37. sealed case class ClientTrackingInfo(flags: ClientTrackingFlags, redirect: ClientTrackingRedirect, prefixes: Set[String] = Set.empty) extends Product with Serializable
    Definition Classes
    Connection
  38. sealed trait ClientTrackingMode extends AnyRef
    Definition Classes
    Connection
  39. sealed trait ClientTrackingRedirect extends AnyRef
    Definition Classes
    Connection
  40. sealed trait ClientType extends AnyRef
    Definition Classes
    Connection
  41. sealed trait UnblockBehavior extends AnyRef
    Definition Classes
    Connection
  42. sealed case class GeoView(member: String, dist: Option[Double], hash: Option[Long], longLat: Option[(Geo.this)#LongLat]) extends Product with Serializable
    Definition Classes
    Geo
  43. sealed case class LongLat(longitude: Double, latitude: Double) extends Product with Serializable
    Definition Classes
    Geo
  44. sealed trait RadiusUnit extends AnyRef
    Definition Classes
    Geo
  45. case class StoreBoth(results: (Geo.this)#Store, distances: (Geo.this)#StoreDist) extends (Geo.this)#StoreOptions with Product with Serializable
    Definition Classes
    Geo
  46. sealed case class StoreDist(key: String) extends Product with Serializable
    Definition Classes
    Geo
  47. case class StoreDistances(distances: (Geo.this)#StoreDist) extends (Geo.this)#StoreOptions with Product with Serializable
    Definition Classes
    Geo
  48. sealed trait StoreOptions extends AnyRef
    Definition Classes
    Geo
  49. case class StoreResults(results: (Geo.this)#Store) extends (Geo.this)#StoreOptions with Product with Serializable
    Definition Classes
    Geo
  50. sealed case class Auth(password: String) extends Product with Serializable
    Definition Classes
    Keys
  51. sealed case class By(pattern: String) extends Product with Serializable
    Definition Classes
    Keys
  52. sealed case class Freq(frequency: String) extends Product with Serializable
    Definition Classes
    Keys
  53. sealed case class IdleTime(seconds: Long) extends Product with Serializable
    Definition Classes
    Keys
  54. sealed trait RedisType extends Product with Serializable
    Definition Classes
    Keys
  55. sealed case class ListMaxLen(count: Long) extends Product with Serializable
    Definition Classes
    Lists
  56. sealed trait Position extends AnyRef
    Definition Classes
    Lists
  57. sealed case class Rank(rank: Long) extends Product with Serializable
    Definition Classes
    Lists
  58. sealed trait Side extends AnyRef
    Definition Classes
    Lists
  59. sealed trait DebugMode extends AnyRef
    Definition Classes
    Scripting
  60. sealed case class Count(count: Long) extends Product with Serializable
    Definition Classes
    Shared
  61. sealed case class Limit(offset: Long, count: Long) extends Product with Serializable
    Definition Classes
    Shared
  62. sealed trait Order extends AnyRef
    Definition Classes
    Shared
  63. sealed case class Pattern(pattern: String) extends Product with Serializable
    Definition Classes
    Shared
  64. sealed case class Store(key: String) extends Product with Serializable
    Definition Classes
    Shared
  65. sealed trait Update extends AnyRef
    Definition Classes
    Shared
  66. sealed trait Aggregate extends Product
    Definition Classes
    SortedSets
  67. sealed trait LexMaximum extends AnyRef
    Definition Classes
    SortedSets
  68. sealed trait LexMinimum extends AnyRef
    Definition Classes
    SortedSets
  69. sealed case class LexRange(min: LexMinimum, max: LexMaximum) extends Product with Serializable
    Definition Classes
    SortedSets
  70. sealed case class MemberScore[+M](score: Double, member: M) extends Product with Serializable
    Definition Classes
    SortedSets
  71. sealed trait ScoreMaximum extends AnyRef
    Definition Classes
    SortedSets
  72. sealed trait ScoreMinimum extends AnyRef
    Definition Classes
    SortedSets
  73. sealed case class ScoreRange(min: ScoreMinimum, max: ScoreMaximum) extends Product with Serializable
    Definition Classes
    SortedSets
  74. sealed case class Group[G, C](group: G, consumer: C) extends Product with Serializable
    Definition Classes
    Streams
  75. sealed case class PendingInfo(total: Long, first: Option[String], last: Option[String], consumers: Map[String, Long]) extends Product with Serializable
    Definition Classes
    Streams
  76. sealed case class PendingMessage(id: String, owner: String, lastDelivered: zio.Duration, counter: Long) extends Product with Serializable
    Definition Classes
    Streams
  77. sealed case class StreamChunk[N, I, K, V](name: N, entries: Chunk[StreamEntry[I, K, V]]) extends Product with Serializable
    Definition Classes
    Streams
  78. sealed case class StreamConsumersInfo(name: String, pending: Long, idle: zio.Duration) extends Product with Serializable
    Definition Classes
    Streams
  79. sealed case class StreamEntry[I, K, V](id: I, fields: Map[K, V]) extends Product with Serializable
    Definition Classes
    Streams
  80. sealed case class StreamGroupsInfo(name: String, consumers: Long, pending: Long, lastDeliveredId: String) extends Product with Serializable
    Definition Classes
    Streams
  81. sealed case class StreamInfo[I, K, V](length: Long, radixTreeKeys: Long, radixTreeNodes: Long, groups: Long, lastGeneratedId: String, firstEntry: Option[StreamEntry[I, K, V]], lastEntry: Option[StreamEntry[I, K, V]]) extends Product with Serializable
    Definition Classes
    Streams
  82. sealed case class StreamMaxLen(approximate: Boolean, count: Long) extends Product with Serializable
    Definition Classes
    Streams
  83. sealed trait XGroupCommand extends AnyRef
    Definition Classes
    Streams
  84. sealed trait BitFieldCommand extends AnyRef
    Definition Classes
    Strings
  85. sealed trait BitFieldType extends AnyRef
    Definition Classes
    Strings
  86. sealed trait BitOperation extends AnyRef
    Definition Classes
    Strings
  87. sealed case class BitPosRange(start: Long, end: Option[Long]) extends Product with Serializable
    Definition Classes
    Strings
  88. sealed trait Expire extends AnyRef
    Definition Classes
    Strings
  89. sealed trait ExpiredAt extends AnyRef
    Definition Classes
    Strings
  90. sealed trait LcsOutput extends AnyRef
    Definition Classes
    Strings
  91. case class Match(matchIdxA: MatchIdx, matchIdxB: MatchIdx, matchLength: Option[Long] = None) extends Product with Serializable
    Definition Classes
    Strings
  92. case class MatchIdx(start: Long, end: Long) extends Product with Serializable
    Definition Classes
    Strings
  93. sealed trait StrAlgoLCS extends AnyRef
    Definition Classes
    Strings
  94. sealed trait StrAlgoLcsQueryType extends AnyRef
    Definition Classes
    Strings

Value Members

  1. final def append[K, V](key: K, value: V)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Long]

    Append a value to a key.

    Append a value to a key.

    key

    Key of the string to add the value to

    value

    Value to append to the string

    returns

    Returns the length of the string after the append operation.

    Definition Classes
    Strings
  2. final def auth(password: String): ZIO[Redis, RedisError, Unit]

    Authenticates the current connection to the server in two cases:

    Authenticates the current connection to the server in two cases:

    • If the Redis server is password protected via the the requirepass option
    • If a Redis 6.0 instance, or greater, is using the Redis ACL system. In this case it is assumed that the implicit username is default.
    password

    the password used to authenticate the connection

    returns

    if the password provided via AUTH matches the password in the configuration file, the Unit value is returned and the server starts accepting commands. Otherwise, an error is returned and the client needs to try a new password.

    Definition Classes
    Connection
  3. final def bitCount[K](key: K, range: Option[Range] = None)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Count set bits in a string.

    Count set bits in a string.

    key

    Key of the string of which to count the bits

    range

    Range of bytes to count

    returns

    Returns the number of bits set to 1.

    Definition Classes
    Strings
  4. final def bitField[K](key: K, bitFieldCommand: BitFieldCommand, bitFieldCommands: BitFieldCommand*)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Chunk[Option[Long]]]

    Perform arbitrary bitfield integer operations on strings.

    Perform arbitrary bitfield integer operations on strings.

    key

    Key of the string to operate on

    bitFieldCommand

    First command to apply

    bitFieldCommands

    Subsequent commands to apply

    returns

    Returns an optional long result of each command applied.

    Definition Classes
    Strings
  5. final def bitOp[D, S](operation: BitOperation, destKey: D, srcKey: S, srcKeys: S*)(implicit arg0: Schema[D], arg1: Schema[S]): ZIO[Redis, RedisError, Long]

    Perform bitwise operations between strings.

    Perform bitwise operations between strings.

    operation

    Bit operation to apply

    destKey

    Key of destination string to store the result

    srcKey

    First source key to apply the operation to

    srcKeys

    Subsequent source keys to apply the operation to

    returns

    Returns size of the string stored in the destination key, that is equal to the size of the longest input string.

    Definition Classes
    Strings
  6. final def bitPos[K](key: K, bit: Boolean, range: Option[BitPosRange] = None)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Find first bit set or clear in a string.

    Find first bit set or clear in a string.

    key

    Key of the string to search within

    bit

    Whether to search for a set bit or a cleared bit

    range

    Range of bytes to search

    returns

    Returns the position of the first bit set to 1 or 0 according to the request.

    Definition Classes
    Strings
  7. final def blMove[S, D](source: S, destination: D, sourceSide: Side, destinationSide: Side, timeout: zio.Duration)(implicit arg0: Schema[S], arg1: Schema[D]): ResultBuilder1[Option]

    BLMOVE is the blocking variant of LMOVE.

    BLMOVE is the blocking variant of LMOVE. When source contains elements, this command behaves exactly like LMOVE. When used inside a MULTI/EXEC block, this command behaves exactly like zio.redis.api.Lists#lMove. When source is empty, Redis will block the connection until another client pushes to it or until timeout is reached. A timeout of zero can be used to block indefinitely.

    source

    the key where the element is removed

    destination

    the key where the element is inserted

    sourceSide

    the side where the element is removed

    destinationSide

    the side where the element is inserted

    timeout

    the timeout in seconds

    returns

    the element which is moved or nil when the timeout is reached.

    Definition Classes
    Lists
  8. final def blPop[K](key: K, keys: K*)(timeout: zio.Duration)(implicit arg0: Schema[K]): ResultBuilder1[[x]Option[(K, x)]]

    Removes and gets the first element in a list, or blocks until one is available.

    Removes and gets the first element in a list, or blocks until one is available. An element is popped from the head of the first list that is non-empty, with the given keys being checked in the order that they are given.

    key

    the key identifier of the first list to be checked

    keys

    the key identifiers of the rest of the lists

    timeout

    the maximum time to wait until an element is available. A timeout of zero can be used to block indefinitely

    returns

    a tuple with the first element being the name of the key where an element was popped and the second element being the value of the popped element. An empty value is returned when no element could be popped and the timeout expired.

    Definition Classes
    Lists
  9. final def brPop[K](key: K, keys: K*)(timeout: zio.Duration)(implicit arg0: Schema[K]): ResultBuilder1[[x]Option[(K, x)]]

    Removes and gets the last element in a list, or block until one is available.

    Removes and gets the last element in a list, or block until one is available. An element is popped from the tail of the first list that is non-empty, with the given keys being checked in the order that they are given.

    key

    the key identifier of the first list to be checked

    keys

    the key identifiers of the rest of the lists

    timeout

    the maximum time to wait until an element is available. A timeout of zero can be used to block indefinitely

    returns

    a tuple with the first element being the name of the key where an element was popped and the second element being the value of the popped element. An empty value is returned when no element could be popped and the timeout expired.

    Definition Classes
    Lists
  10. final def brPopLPush[S, D](source: S, destination: D, timeout: zio.Duration)(implicit arg0: Schema[S], arg1: Schema[D]): ResultBuilder1[Option]

    Pops an element from the list stored at source, pushes it to the list stored at destination; or block until one is available.

    Pops an element from the list stored at source, pushes it to the list stored at destination; or block until one is available. This is the blocking variant of zio.redis.api.Lists#rPopLPush.

    source

    the key identifier of the source list

    destination

    the key identifier of the target list

    timeout

    the maximum time to wait for an element to be available. A timeout of zero can be used to block indefinitely

    returns

    the element being popped from source and pushed to destination. If timeout is reached, an empty reply is returned.

    Definition Classes
    Lists
  11. final def bzPopMax[K](timeout: zio.Duration, key: K, keys: K*)(implicit arg0: Schema[K]): ResultBuilder1[[x]Option[(K, MemberScore[x])]]

    Remove and return the member with the highest score from one or more sorted sets, or block until one is available.

    Remove and return the member with the highest score from one or more sorted sets, or block until one is available.

    timeout

    Maximum number of seconds to block. A timeout of zero can be used to block indefinitely

    key

    Key of the set

    keys

    Keys of the rest sets

    returns

    A three-element Chunk with the first element being the name of the key where a member was popped, the second element is the popped member itself, and the third element is the score of the popped element. An empty chunk is returned when no element could be popped and the timeout expired.

    Definition Classes
    SortedSets
  12. final def bzPopMin[K](timeout: zio.Duration, key: K, keys: K*)(implicit arg0: Schema[K]): ResultBuilder1[[x]Option[(K, MemberScore[x])]]

    Remove and return the member with the lowest score from one or more sorted sets, or block until one is available.

    Remove and return the member with the lowest score from one or more sorted sets, or block until one is available.

    timeout

    Maximum number of seconds to block. A timeout of zero can be used to block indefinitely

    key

    Key of the set

    keys

    Keys of the rest sets

    returns

    A three-element Chunk with the first element being the name of the key where a member was popped, the second element is the popped member itself, and the third element is the score of the popped element. An empty chunk is returned when no element could be popped and the timeout expired.

    Definition Classes
    SortedSets
  13. final def clientCaching(track: Boolean): ZIO[Redis, RedisError, Unit]

    Controls the tracking of the keys in the next command executed by the connection, when tracking is enabled in Optin or Optout mode.

    Controls the tracking of the keys in the next command executed by the connection, when tracking is enabled in Optin or Optout mode.

    track

    specifies whether to enable the tracking of the keys in the next command or not

    returns

    the Unit value.

    Definition Classes
    Connection
  14. final def clientGetName: ZIO[Redis, RedisError, Option[String]]

    Returns the name of the current connection as set by clientSetName

    Returns the name of the current connection as set by clientSetName

    returns

    the connection name, or None if a name wasn't set.

    Definition Classes
    Connection
  15. final def clientGetRedir: ZIO[Redis, RedisError, ClientTrackingRedirect]

    Returns the client ID we are redirecting our tracking notifications to

    Returns the client ID we are redirecting our tracking notifications to

    returns

    the client ID if the tracking is enabled and the notifications are being redirected

    Definition Classes
    Connection
  16. final def clientId: ZIO[Redis, RedisError, Long]

    Returns the ID of the current connection.

    Returns the ID of the current connection. Every connection ID has certain guarantees:

    • It is never repeated, so if clientID returns the same number, the caller can be sure that the underlying client did not disconnect and reconnect the connection, but it is still the same connection.
    • The ID is monotonically incremental. If the ID of a connection is greater than the ID of another connection, it is guaranteed that the second connection was established with the server at a later time.
    returns

    the ID of the current connection.

    Definition Classes
    Connection
  17. final def clientKill(filters: ClientKillFilter*): ZIO[Redis, RedisError, Long]

    Closes client connections with the specified filters.The following filters are available:

    Closes client connections with the specified filters.The following filters are available:

    • Address(ip, port). Kill all clients connected to specified address
    • LocalAddress(ip, port). Kill all clients connected to specified local (bind) address
    • Id(id). Allows to kill a client by its unique ID field. Client ID's are retrieved using the CLIENT LIST command
    • ClientType, where the type is one of normal, master, replica and pubsub. This closes the connections of all the clients in the specified class. Note that clients blocked into the MONITOR command are considered to belong to the normal class
    • User(username). Closes all the connections that are authenticated with the specified ACL username, however it returns an error if the username does not map to an existing ACL user
    • SkipMe(skip). By default this option is set to yes, that is, the client calling the command will not get killed, however setting this option to no will have the effect of also killing the client calling the command It is possible to provide multiple filters at the same time. The command will handle multiple filters via logical AND
    filters

    the specified filters for killing clients

    returns

    the number of clients killed.

    Definition Classes
    Connection
  18. final def clientKill(address: Address): ZIO[Redis, RedisError, Unit]

    Closes a given client connection with the specified address

    Closes a given client connection with the specified address

    address

    the address of the client to kill

    returns

    the Unit value.

    Definition Classes
    Connection
  19. final def clientPause(timeout: zio.Duration, mode: Option[ClientPauseMode] = None): ZIO[Redis, RedisError, Unit]

    Able to suspend all the Redis clients for the specified amount of time (in milliseconds).

    Able to suspend all the Redis clients for the specified amount of time (in milliseconds). Currently supports two modes:

    • All: This is the default mode. All client commands are blocked
    • Write: Clients are only blocked if they attempt to execute a write command
    timeout

    the length of the pause in milliseconds

    mode

    option to specify the client pause mode

    returns

    the Unit value.

    Definition Classes
    Connection
  20. final def clientSetName(name: String): ZIO[Redis, RedisError, Unit]

    Assigns a name to the current connection

    Assigns a name to the current connection

    name

    the name to be assigned

    returns

    the Unit value.

    Definition Classes
    Connection
  21. final def clientTrackingInfo: ZIO[Redis, RedisError, ClientTrackingInfo]

    Returns information about the current client connection's use of the server assisted client side caching feature

    Returns information about the current client connection's use of the server assisted client side caching feature

    returns

    tracking information.

    Definition Classes
    Connection
  22. final def clientTrackingOff: ZIO[Redis, RedisError, Unit]

    Disables the tracking feature of the Redis server, that is used for server assisted client side caching

    Disables the tracking feature of the Redis server, that is used for server assisted client side caching

    returns

    the Unit value.

    Definition Classes
    Connection
  23. final def clientTrackingOn(redirect: Option[Long] = None, trackingMode: Option[ClientTrackingMode] = None, noLoop: Boolean = false, prefixes: Set[String] = Set.empty): ZIO[Redis, RedisError, Unit]

    Enables the tracking feature of the Redis server, that is used for server assisted client side caching.

    Enables the tracking feature of the Redis server, that is used for server assisted client side caching. The feature will remain active in the current connection for all its life, unless tracking is turned off with clientTrackingOff

    redirect

    the ID of the connection we want to send invalidation messages to

    trackingMode

    the mode used for tracking

    noLoop

    no loop option

    prefixes

    the prefixes registered

    returns

    the Unit value.

    Definition Classes
    Connection
  24. final def clientUnblock(clientId: Long, error: Option[UnblockBehavior] = None): ZIO[Redis, RedisError, Boolean]

    Unblocks, from a different connection, a client blocked in a blocking operation

    Unblocks, from a different connection, a client blocked in a blocking operation

    clientId

    the ID of the client to unblock

    error

    option to specify the unblocking behavior

    returns

    true if the client was unblocked successfully, or false if the client wasn't unblocked.

    Definition Classes
    Connection
  25. final def clientUnpause: ZIO[Redis, RedisError, Unit]

    Resumes command processing for all clients that were paused by clientPause

    Resumes command processing for all clients that were paused by clientPause

    returns

    the Unit value.

    Definition Classes
    Connection
  26. final def decr[K](key: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Decrement the integer value of a key by one.

    Decrement the integer value of a key by one.

    key

    Key to decrement

    returns

    Returns the value of key after the decrement.

    Definition Classes
    Strings
  27. final def decrBy[K](key: K, decrement: Long)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Decrement the integer value of a key by the given number.

    Decrement the integer value of a key by the given number.

    key

    Key of the integer value to decrement

    decrement

    Amount to decrement by

    returns

    Returns the value of key after the decrement.

    Definition Classes
    Strings
  28. final def del[K](key: K, keys: K*)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Removes the specified keys.

    Removes the specified keys. A key is ignored if it does not exist.

    key

    one required key

    keys

    maybe rest of the keys

    returns

    The number of keys that were removed.

    Definition Classes
    Keys
    See also

    unlink

  29. final def dump[K](key: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Chunk[Byte]]

    Serialize the value stored at key in a Redis-specific format and return it to the user.

    Serialize the value stored at key in a Redis-specific format and return it to the user.

    key

    key

    returns

    bytes for value stored at key.

    Definition Classes
    Keys
  30. final def echo(message: String): ZIO[Redis, RedisError, String]

    Echoes the given string.

    Echoes the given string.

    message

    the message to be echoed

    returns

    the message.

    Definition Classes
    Connection
  31. def eval[K, A](script: String, keys: Chunk[K], args: Chunk[A])(implicit arg0: Input[K], arg1: Input[A]): ResultOutputBuilder

    Evaluates a Lua script.

    Evaluates a Lua script.

    script

    Lua script

    keys

    keys available through KEYS param in the script

    args

    values available through ARGV param in the script

    returns

    redis protocol value that is converted from the Lua type. You have to write decoder that would convert redis protocol value to a suitable type for your app

    Definition Classes
    Scripting
  32. def evalSha[K, A](sha1: String, keys: Chunk[K], args: Chunk[A])(implicit arg0: Input[K], arg1: Input[A]): ResultOutputBuilder

    Evaluates a Lua script cached on the server side by its SHA1 digest.

    Evaluates a Lua script cached on the server side by its SHA1 digest. Scripts could be cached using the zio.redis.api.Scripting.scriptLoad method.

    sha1

    SHA1 digest

    keys

    keys available through KEYS param in the script

    args

    values available through ARGV param in the script

    returns

    redis protocol value that is converted from the Lua type. You have to write decoder that would convert redis protocol value to a suitable type for your app

    Definition Classes
    Scripting
  33. final def exists[K](key: K, keys: K*)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    The number of keys existing among the ones specified as arguments.

    The number of keys existing among the ones specified as arguments. Keys mentioned multiple times and existing are counted multiple times.

    key

    one required key

    keys

    maybe rest of the keys

    returns

    The number of keys existing.

    Definition Classes
    Keys
  34. final def expire[K](key: K, timeout: zio.Duration)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Boolean]

    Set a timeout on key.

    Set a timeout on key. After the timeout has expired, the key will automatically be deleted.

    key

    key

    timeout

    timeout

    returns

    true, if the timeout was set, false if the key didn't exist.

    Definition Classes
    Keys
    See also

    expireAt

  35. final def expireAt[K](key: K, timestamp: Instant)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Boolean]

    Deletes the key at the specific timestamp.

    Deletes the key at the specific timestamp. A timestamp in the past will delete the key immediately.

    key

    key

    timestamp

    an absolute Unix timestamp (seconds since January 1, 1970)

    returns

    true, if the timeout was set, false if the key didn't exist.

    Definition Classes
    Keys
    See also

    expire

  36. final def geoAdd[K, M](key: K, item: (LongLat, M), items: (LongLat, M)*)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Long]

    Adds the specified geospatial items (latitude, longitude, name) to the specified key.

    Adds the specified geospatial items (latitude, longitude, name) to the specified key.

    key

    sorted set where the items will be stored

    item

    tuple of (latitude, longitude, name) to add

    items

    additional items

    returns

    number of new elements added to the sorted set.

    Definition Classes
    Geo
  37. final def geoDist[K, M](key: K, member1: M, member2: M, radiusUnit: Option[RadiusUnit] = None)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Option[Double]]

    Return the distance between two members in the geospatial index represented by the sorted set.

    Return the distance between two members in the geospatial index represented by the sorted set.

    key

    sorted set of geospatial members

    member1

    member in set

    member2

    member in set

    radiusUnit

    Unit of distance ("m", "km", "ft", "mi")

    returns

    distance between the two specified members in the specified unit or None if either member is missing.

    Definition Classes
    Geo
  38. final def geoHash[K, M](key: K, member: M, members: M*)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Chunk[Option[String]]]

    Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index.

    Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index.

    key

    sorted set of geospatial members

    member

    member in set

    members

    additional members

    returns

    chunk of geohashes, where value is None if a member is not in the set.

    Definition Classes
    Geo
  39. final def geoPos[K, M](key: K, member: M, members: M*)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Chunk[Option[LongLat]]]

    Return the positions (longitude, latitude) of all the specified members of the geospatial index represented by the sorted set at key.

    Return the positions (longitude, latitude) of all the specified members of the geospatial index represented by the sorted set at key.

    key

    sorted set of geospatial members

    member

    member in the set

    members

    additional members

    returns

    chunk of positions, where value is None if a member is not in the set.

    Definition Classes
    Geo
  40. final def geoRadius[K](key: K, center: LongLat, radius: Double, radiusUnit: RadiusUnit, withCoord: Option[WithCoord] = None, withDist: Option[WithDist] = None, withHash: Option[WithHash] = None, count: Option[Count] = None, order: Option[Order] = None)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Chunk[GeoView]]

    Return geospatial members of a sorted set which are within the area specified with a *center location* and the *maximum distance from the center*.

    Return geospatial members of a sorted set which are within the area specified with a *center location* and the *maximum distance from the center*.

    key

    sorted set of geospatial members

    center

    position

    radius

    distance from the center

    radiusUnit

    Unit of distance ("m", "km", "ft", "mi")

    withCoord

    flag to include the position of each member in the result

    withDist

    flag to include the distance of each member from the center in the result

    withHash

    flag to include raw geohash sorted set score of each member in the result

    count

    limit the results to the first N matching items

    order

    sort returned items in the given Order

    returns

    chunk of members within the specified are.

    Definition Classes
    Geo
  41. final def geoRadiusByMember[K, M](key: K, member: M, radius: Double, radiusUnit: RadiusUnit, withCoord: Option[WithCoord] = None, withDist: Option[WithDist] = None, withHash: Option[WithHash] = None, count: Option[Count] = None, order: Option[Order] = None)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Chunk[GeoView]]

    Return geospatial members of a sorted set which are within the area specified with an *existing member* in the set and the *maximum distance from the location of that member*.

    Return geospatial members of a sorted set which are within the area specified with an *existing member* in the set and the *maximum distance from the location of that member*.

    key

    sorted set of geospatial members

    member

    member in the set

    radius

    distance from the member

    radiusUnit

    Unit of distance ("m", "km", "ft", "mi")

    withCoord

    flag to include the position of each member in the result

    withDist

    flag to include the distance of each member from the center in the result

    withHash

    flag to include raw geohash sorted set score of each member in the result

    count

    limit the results to the first N matching items

    order

    sort returned items in the given Order number should be stored

    returns

    chunk of members within the specified area, or an error if the member is not in the set.

    Definition Classes
    Geo
  42. final def geoRadiusByMemberStore[K, M](key: K, member: M, radius: Double, radiusUnit: RadiusUnit, store: StoreOptions, withCoord: Option[WithCoord] = None, withDist: Option[WithDist] = None, withHash: Option[WithHash] = None, count: Option[Count] = None, order: Option[Order] = None)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Long]

    Similar to geoRadiusByMember, but store the results to the argument passed to store and return the number of elements stored.

    Similar to geoRadiusByMember, but store the results to the argument passed to store and return the number of elements stored. Added as a separate Scala function because it returns a Long instead of the list of results. Find geospatial members of a sorted set which are within the area specified with an *existing member* in the set and the *maximum distance from the location of that member*.

    key

    sorted set of geospatial members

    member

    member in the set

    radius

    distance from the member

    radiusUnit

    Unit of distance ("m", "km", "ft", "mi")

    store

    sorted set where the results and/or distances should be stored

    withCoord

    flag to include the position of each member in the result

    withDist

    flag to include the distance of each member from the center in the result

    withHash

    flag to include raw geohash sorted set score of each member in the result

    count

    limit the results to the first N matching items

    order

    sort returned items in the given Order

    returns

    chunk of members within the specified area, or an error if the member is not in the set. We expect at least one of Option[Store] and Option[StoreDist] to be passed here.

    Definition Classes
    Geo
  43. final def geoRadiusStore[K](key: K, center: LongLat, radius: Double, radiusUnit: RadiusUnit, store: StoreOptions, withCoord: Option[WithCoord] = None, withDist: Option[WithDist] = None, withHash: Option[WithHash] = None, count: Option[Count] = None, order: Option[Order] = None)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Similar to geoRadius, but store the results to the argument passed to store and return the number of elements stored.

    Similar to geoRadius, but store the results to the argument passed to store and return the number of elements stored. Added as a separate Scala function because it returns a Long instead of the list of results. Find the geospatial members of a sorted set which are within the area specified with a *center location* and the *maximum distance from the center*.

    key

    sorted set of geospatial members

    center

    position

    radius

    distance from the center

    radiusUnit

    Unit of distance ("m", "km", "ft", "mi")

    store

    sorted set where the results and/or distances should be stored

    withCoord

    flag to include the position of each member in the result

    withDist

    flag to include the distance of each member from the center in the result

    withHash

    flag to include raw geohash sorted set score of each member in the result

    count

    limit the results to the first N matching items

    order

    sort returned items in the given Order

    returns

    chunk of members within the specified are. We expect at least one of Option[Store] and Option[StoreDist] to be passed here.

    Definition Classes
    Geo
  44. final def get[K](key: K)(implicit arg0: Schema[K]): ResultBuilder1[Option]

    Get the value of a key.

    Get the value of a key.

    key

    Key to get the value of

    returns

    Returns the value of the string or None if it does not exist.

    Definition Classes
    Strings
  45. final def getBit[K](key: K, offset: Long)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Returns the bit value at offset in the string value stored at key.

    Returns the bit value at offset in the string value stored at key.

    key

    Key of the string to get the bit from

    offset

    Offset to the bit

    returns

    Returns the bit value stored at offset.

    Definition Classes
    Strings
  46. final def getDel[K](key: K)(implicit arg0: Schema[K]): ResultBuilder1[Option]

    Get the string value of a key and delete it on success (if and only if the key's value type is a string).

    Get the string value of a key and delete it on success (if and only if the key's value type is a string).

    key

    Key to get the value of

    returns

    Returns the value of the string or None if it did not previously have a value.

    Definition Classes
    Strings
  47. final def getEx[K](key: K, persist: Boolean)(implicit arg0: Schema[K]): ResultBuilder1[Option]

    Get the value of key and remove the time to live associated with the key.

    Get the value of key and remove the time to live associated with the key.

    key

    Key to get the value of

    persist

    if true, remove the time to live associated with the key, otherwise not

    returns

    Returns the value of the string or None if it did not previously have a value.

    Definition Classes
    Strings
  48. final def getEx[K](key: K, expiredAt: ExpiredAt, timestamp: Instant)(implicit arg0: Schema[K]): ResultBuilder1[Option]

    Get the value of key and set its expiration.

    Get the value of key and set its expiration.

    key

    Key to get the value of

    expiredAt

    The option which can modify command behavior. e.g. use Expire.SetExpireAtSeconds set the specified Unix time at which the key will expire in seconds

    timestamp

    an absolute Unix timestamp (seconds/milliseconds since January 1, 1970)

    returns

    Returns the value of the string or None if it did not previously have a value.

    Definition Classes
    Strings
  49. final def getEx[K](key: K, expire: Expire, expireTime: zio.Duration)(implicit arg0: Schema[K]): ResultBuilder1[Option]

    Get the value of key and set its expiration.

    Get the value of key and set its expiration.

    key

    Key to get the value of

    expire

    The option which can modify command behavior. e.g. use Expire.SetExpireSeconds set the specified expire time in seconds

    expireTime

    Time in seconds/milliseconds until the string should expire

    returns

    Returns the value of the string or None if it did not previously have a value.

    Definition Classes
    Strings
  50. final def getRange[K](key: K, range: Range)(implicit arg0: Schema[K]): ResultBuilder1[Option]

    Get a substring of the string stored at key.

    Get a substring of the string stored at key.

    key

    Key of the string to get a substring of

    range

    Range of the substring

    returns

    Returns the substring.

    Definition Classes
    Strings
  51. final def getSet[K, V](key: K, value: V)(implicit arg0: Schema[K], arg1: Schema[V]): ResultBuilder1[Option]

    Set the string value of a key and return its old value.

    Set the string value of a key and return its old value.

    key

    Key of string to set

    value

    New value of the string

    returns

    Returns the previous value of the string or None if it did not previously have a value.

    Definition Classes
    Strings
  52. final def hDel[K, F](key: K, field: F, fields: F*)(implicit arg0: Schema[K], arg1: Schema[F]): ZIO[Redis, RedisError, Long]

    Removes the specified fields from the hash stored at key.

    Removes the specified fields from the hash stored at key.

    key

    of the hash that should be removed

    field

    field to remove

    fields

    additional fields

    returns

    number of fields removed from the hash.

    Definition Classes
    Hashes
  53. final def hExists[K, F](key: K, field: F)(implicit arg0: Schema[K], arg1: Schema[F]): ZIO[Redis, RedisError, Boolean]

    Returns if field is an existing field in the hash stored at key.

    Returns if field is an existing field in the hash stored at key.

    key

    of the hash that should be inspected

    field

    field to inspect

    returns

    true if the field exists, otherwise false.

    Definition Classes
    Hashes
  54. final def hGet[K, F](key: K, field: F)(implicit arg0: Schema[K], arg1: Schema[F]): ResultBuilder1[Option]

    Returns the value associated with field in the hash stored at key.

    Returns the value associated with field in the hash stored at key.

    key

    of the hash whose field should be read

    field

    which value should be returned

    returns

    value stored in the field, if any.

    Definition Classes
    Hashes
  55. final def hGetAll[K](key: K)(implicit arg0: Schema[K]): ResultBuilder2[Map]

    Returns all fields and values of the hash stored at key.

    Returns all fields and values of the hash stored at key.

    key

    of the hash that should be read

    returns

    map of field -> value pairs under the key.

    Definition Classes
    Hashes
  56. final def hIncrBy[K, F](key: K, field: F, increment: Long)(implicit arg0: Schema[K], arg1: Schema[F]): ZIO[Redis, RedisError, Long]

    Increments the number stored at field in the hash stored at key by increment.

    Increments the number stored at field in the hash stored at key by increment. If field does not exist the value is set to increment.

    key

    of the hash that should be updated

    field

    field containing an integer, or a new field

    increment

    integer to increment with

    returns

    integer value after incrementing, or error if the field is not an integer.

    Definition Classes
    Hashes
  57. final def hIncrByFloat[K, F](key: K, field: F, increment: Double)(implicit arg0: Schema[K], arg1: Schema[F]): ZIO[Redis, RedisError, Double]

    Increment the specified field of a hash stored at key, and representing a floating point number by the specified increment.

    Increment the specified field of a hash stored at key, and representing a floating point number by the specified increment.

    key

    of the hash that should be updated

    field

    field containing a float, or a new field

    increment

    float to increment with

    returns

    float value after incrementing, or error if the field is not a float.

    Definition Classes
    Hashes
  58. final def hKeys[K](key: K)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Returns all field names in the hash stored at key.

    Returns all field names in the hash stored at key.

    key

    of the hash whose fields should be returned

    returns

    chunk of field names.

    Definition Classes
    Hashes
  59. final def hLen[K](key: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Returns the number of fields contained in the hash stored at key.

    Returns the number of fields contained in the hash stored at key.

    key

    of the hash whose fields should be counted

    returns

    number of fields.

    Definition Classes
    Hashes
  60. final def hRandField[K](key: K, count: Long, withValues: Boolean = false)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Returns an array of at most count distinct fields randomly.

    Returns an array of at most count distinct fields randomly. If called with a negative count, the command will return exactly count fields, allowing repeats. If withValues is true it will return fields with his values intercalated.

    key

    of the hash which fields should be read

    count

    maximum number of different fields to return if positive or the exact number, in absolute value if negative

    withValues

    when true includes the respective values of the randomly selected hash fields

    returns

    a list of fields or fields and values if withValues is true.

    Definition Classes
    Hashes
  61. final def hRandField[K](key: K)(implicit arg0: Schema[K]): ResultBuilder1[Option]

    Returns a random field from the hash value stored at key

    Returns a random field from the hash value stored at key

    key

    of the hash which fields should be read

    returns

    random field in the hash or None when key does not exist.

    Definition Classes
    Hashes
  62. final def hScan[K](key: K, cursor: Long, pattern: Option[String] = None, count: Option[Count] = None)(implicit arg0: Schema[K]): ResultBuilder2[[x, y](Long, Chunk[(x, y)])]

    Iterates fields of Hash types and their associated values using a cursor-based iterator

    Iterates fields of Hash types and their associated values using a cursor-based iterator

    key

    of the hash that should be scanned

    cursor

    integer representing iterator

    pattern

    regular expression matching keys to scan

    count

    approximate number of elements to return (see https://redis.io/commands/scan#the-count-option)

    returns

    pair containing the next cursor and list of elements scanned.

    Definition Classes
    Hashes
  63. final def hSet[K, F, V](key: K, pair: (F, V), pairs: (F, V)*)(implicit arg0: Schema[K], arg1: Schema[F], arg2: Schema[V]): ZIO[Redis, RedisError, Long]

    Sets field -> value pairs in the hash stored at key

    Sets field -> value pairs in the hash stored at key

    key

    of the hash whose value should be set

    pair

    mapping of a field to value

    pairs

    additional pairs

    returns

    number of fields added.

    Definition Classes
    Hashes
  64. final def hSetNx[K, F, V](key: K, field: F, value: V)(implicit arg0: Schema[K], arg1: Schema[F], arg2: Schema[V]): ZIO[Redis, RedisError, Boolean]

    Sets field in the hash stored at key to value, only if field does not yet exist

    Sets field in the hash stored at key to value, only if field does not yet exist

    key

    of the hash whose value should be set

    field

    for which a value should be set

    value

    that should be set

    returns

    true if field is a new field and value was set, otherwise false.

    Definition Classes
    Hashes
  65. final def hStrLen[K, F](key: K, field: F)(implicit arg0: Schema[K], arg1: Schema[F]): ZIO[Redis, RedisError, Long]

    Returns the string length of the value associated with field in the hash stored at key

    Returns the string length of the value associated with field in the hash stored at key

    key

    of the hash that should be read

    field

    which value length should be returned

    returns

    string length of the value in field, or zero if either field or key do not exist.

    Definition Classes
    Hashes
  66. final def hVals[K](key: K)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Returns all values in the hash stored at key

    Returns all values in the hash stored at key

    key

    of the hash which values should be read

    returns

    list of values in the hash, or an empty list when key does not exist.

    Definition Classes
    Hashes
  67. final def hmGet[K, F](key: K, field: F, fields: F*)(implicit arg0: Schema[K], arg1: Schema[F]): ResultBuilder1[[x]Chunk[Option[x]]]

    Returns the values associated with the specified fields in the hash stored at key.

    Returns the values associated with the specified fields in the hash stored at key.

    key

    of the hash whose values should be read

    field

    fields to retrieve

    fields

    additional fields

    returns

    chunk of values, where value is None if the field is not in the hash.

    Definition Classes
    Hashes
  68. final def hmSet[K, F, V](key: K, pair: (F, V), pairs: (F, V)*)(implicit arg0: Schema[K], arg1: Schema[F], arg2: Schema[V]): ZIO[Redis, RedisError, Unit]

    Sets the specified field -> value pairs in the hash stored at key.

    Sets the specified field -> value pairs in the hash stored at key. Deprecated: As per Redis 4.0.0, HMSET is considered deprecated. Please use hSet instead.

    key

    of the hash whose value should be set

    pair

    mapping of a field to value

    pairs

    additional pairs

    returns

    unit if fields are successfully set.

    Definition Classes
    Hashes
  69. final def incr[K](key: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Increment the integer value of a key by one.

    Increment the integer value of a key by one.

    key

    Key of the string to increment

    returns

    Returns the value of key after the increment.

    Definition Classes
    Strings
  70. final def incrBy[K](key: K, increment: Long)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Increment the integer value of a key by the given amount.

    Increment the integer value of a key by the given amount.

    key

    Key of the value to increment

    increment

    Amount to increment the value by

    returns

    Returns the value of key after the increment.

    Definition Classes
    Strings
  71. final def incrByFloat[K](key: K, increment: Double)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Double]

    Increment the float value of a key by the given amount.

    Increment the float value of a key by the given amount.

    key

    Key of the value to increment

    increment

    Amount to increment the value by

    returns

    Returns the value of key after the increment.

    Definition Classes
    Strings
  72. final def keys(pattern: String): ResultBuilder1[Chunk]

    Returns all keys matching pattern.

    Returns all keys matching pattern.

    pattern

    string pattern

    returns

    keys matching pattern.

    Definition Classes
    Keys
  73. final def lIndex[K](key: K, index: Long)(implicit arg0: Schema[K]): ResultBuilder1[Option]

    Returns the element at index in the list stored at key.

    Returns the element at index in the list stored at key.

    key

    they key identifier

    index

    the requested index. It is zero-based, so 0 means the first element, 1 the second element and so on. Negative indices can be used to designate elements starting at the tail of the list

    returns

    the requested element, or empty if the index is out of range.

    Definition Classes
    Lists
  74. final def lInsert[K, V](key: K, position: Position, pivot: V, element: V)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Long]

    Inserts element in the list stored at key either before or after the reference value pivot.

    Inserts element in the list stored at key either before or after the reference value pivot.

    key

    the key identifier

    position

    the position in which the element will be inserted

    pivot

    the reference value

    element

    the value to be inserted

    returns

    the length of the list after the insert operation, or -1 when the value pivot was not found.

    Definition Classes
    Lists
  75. final def lLen[K](key: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Returns the length of the list stored at key.

    Returns the length of the list stored at key.

    key

    the key identifier. If key does not exist, it is interpreted as an empty list and 0 is returned

    returns

    the length of the list at key.

    Definition Classes
    Lists
  76. final def lMove[S, D](source: S, destination: D, sourceSide: Side, destinationSide: Side)(implicit arg0: Schema[S], arg1: Schema[D]): ResultBuilder1[Option]

    Atomically returns and removes the first/last element (head/tail depending on the wherefrom argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination.

    Atomically returns and removes the first/last element (head/tail depending on the wherefrom argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination.

    source

    the key where the element is removed

    destination

    the key where the element is inserted

    sourceSide

    the side where the element is removed

    destinationSide

    the side where the element is inserted

    returns

    the element which is moved or nil when the source is empty.

    Definition Classes
    Lists
  77. final def lPop[K](key: K)(implicit arg0: Schema[K]): ResultBuilder1[Option]

    Removes and returns the first element of the list stored at key.

    Removes and returns the first element of the list stored at key.

    key

    the key identifier

    returns

    the value of the first element, or empty when key does not exist.

    Definition Classes
    Lists
  78. final def lPos[K, V](key: K, element: V, rank: Option[Rank] = None, maxLen: Option[ListMaxLen] = None)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Option[Long]]

    The command returns the index of matching elements inside a Redis list.

    The command returns the index of matching elements inside a Redis list. By default, when no options are given, it will scan the list from head to tail, looking for the first match of "element". If the element is found, its index (the zero-based position in the list) is returned. Otherwise, if no match is found, NULL is returned.

    key

    the key identifier

    element

    the element to search for

    rank

    the rank of the element

    maxLen

    limit the number of performed comparisons

    returns

    Either an integer or an array depending on the count option.

    Definition Classes
    Lists
  79. final def lPosCount[K, V](key: K, element: V, count: Count, rank: Option[Rank] = None, maxLen: Option[ListMaxLen] = None)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Chunk[Long]]

    The command returns the index of matching elements inside a Redis list.

    The command returns the index of matching elements inside a Redis list. By default, when no options are given, it will scan the list from head to tail, looking for the first match of "element". If the element is found, its index (the zero-based position in the list) is returned. Otherwise, if no match is found, NULL is returned.

    key

    the key identifier

    element

    the element to search for

    count

    return up count element indexes

    rank

    the rank of the element

    maxLen

    limit the number of performed comparisons

    returns

    Either an integer or an array depending on the count option.

    Definition Classes
    Lists
  80. final def lPush[K, V](key: K, element: V, elements: V*)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Long]

    Prepends one or multiple elements to the list stored at key.

    Prepends one or multiple elements to the list stored at key. If key does not exist, it is created as empty list before performing the push operations.

    key

    the key identifier

    element

    the first element to prepend

    elements

    the rest of elements to prepend

    returns

    the length of the list after the push operation.

    Definition Classes
    Lists
  81. final def lPushX[K, V](key: K, element: V, elements: V*)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Long]

    Prepends an element to a list, only if the list exists.

    Prepends an element to a list, only if the list exists. In contrary to zio.redis.api.Lists#lPush, no operation will be performed when key does not yet exist.

    key

    the key identifier

    element

    the first element to prepend

    elements

    the rest of elements to prepends

    returns

    the length of the list after the push operation.

    Definition Classes
    Lists
  82. final def lRange[K](key: K, range: Range)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Gets a range of elements from the list stored at key.

    Gets a range of elements from the list stored at key.

    key

    the key identifier

    range

    the range of elements to retrieve. The range should be zero-based, with 0 being the first element of the list (the head of the list), 1 being the next element and so on

    returns

    a chunk of elements in the specified range.

    Definition Classes
    Lists
  83. final def lRem[K](key: K, count: Long, element: String)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Removes the first count occurrences of element from the list stored at key.

    Removes the first count occurrences of element from the list stored at key. The count argument influences the operation in the following ways:

    • count > 0: Remove elements equal to element moving from head to tail.
    • count < 0: Remove elements equal to element moving from tail to head.
    • count = 0: Remove all elements equal to element.
    key

    the key identifier. Non-existing keys are treated like empty lists, so when key does not exist, the command will always return 0

    count

    the number of elements to remove

    element

    the element to be removed

    returns

    the number of removed elements.

    Definition Classes
    Lists
  84. final def lSet[K, V](key: K, index: Long, element: V)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Unit]

    Sets the list element at index to element.

    Sets the list element at index to element.

    key

    the key identifier

    index

    the requested index. The index is zero-based, so 0 means the first element, 1 the second element and so on

    element

    the value to be inserted

    returns

    the Unit value.

    Definition Classes
    Lists
  85. final def lTrim[K](key: K, range: Range)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Unit]

    Trims an existing list so that it will contain only the specified range of elements.

    Trims an existing list so that it will contain only the specified range of elements.

    key

    the key identifier

    range

    the range of elements to trim. The range should be zero-based, with 0 being the first element of the list (the head of the list), 1 being the next element and so on

    returns

    the Unit value.

    Definition Classes
    Lists
  86. final def mGet[K](key: K, keys: K*)(implicit arg0: Schema[K]): ResultBuilder1[[x]Chunk[Option[x]]]

    Get all the values of the given keys.

    Get all the values of the given keys.

    key

    First key to get

    keys

    Subsequent keys to get

    returns

    Returns the values of the given keys.

    Definition Classes
    Strings
  87. final def mSet[K, V](keyValue: (K, V), keyValues: (K, V)*)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Unit]

    Set multiple keys to multiple values.

    Set multiple keys to multiple values.

    keyValue

    Tuple of key and value, first one to set

    keyValues

    Subsequent tuples of key values

    Definition Classes
    Strings
  88. final def mSetNx[K, V](keyValue: (K, V), keyValues: (K, V)*)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Boolean]

    Set multiple keys to multiple values only if none of the keys exist.

    Set multiple keys to multiple values only if none of the keys exist.

    keyValue

    First key value to set

    keyValues

    Subsequent key values to set

    returns

    1 if the all the keys were set. 0 if no key was set (at least one key already existed).

    Definition Classes
    Strings
  89. final def migrate[K](host: String, port: Long, key: K, destinationDb: Long, timeout: zio.Duration, auth: Option[Auth] = None, copy: Option[Copy] = None, replace: Option[Replace] = None, keys: Option[(K, List[K])])(implicit arg0: Schema[K]): ZIO[Redis, RedisError, String]

    Atomically transfer a key from a source Redis instance to a destination Redis instance.

    Atomically transfer a key from a source Redis instance to a destination Redis instance. On success the key is deleted from the original instance and is guaranteed to exist in the target instance.

    host

    remote redis host

    port

    remote redis instance port

    key

    key to be transferred or empty string if using the keys option

    destinationDb

    remote database id

    timeout

    specifies the longest period without blocking which is allowed during the transfer

    auth

    optionally provide password for the remote instance

    copy

    copy option, to not remove the key from the local instance

    replace

    replace option, to replace existing key on the remote instance

    keys

    keys option, to migrate multiple keys, non empty list of keys

    returns

    string OK on success, or NOKEY if no keys were found in the source instance.

    Definition Classes
    Keys
  90. final def move[K](key: K, destinationDb: Long)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Boolean]

    Move key from the currently selected database to the specified destination database.

    Move key from the currently selected database to the specified destination database. When key already exists in the destination database, or it does not exist in the source database, it does nothing.

    key

    key

    destinationDb

    destination database id

    returns

    true if the key was moved.

    Definition Classes
    Keys
  91. final def pExpire[K](key: K, timeout: zio.Duration)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Boolean]

    Set a timeout on key.

    Set a timeout on key. After the timeout has expired, the key will automatically be deleted.

    key

    key

    timeout

    timeout

    returns

    true, if the timeout was set, false if the key didn't exist.

    Definition Classes
    Keys
    See also

    pExpireAt

  92. final def pExpireAt[K](key: K, timestamp: Instant)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Boolean]

    Deletes the key at the specific timestamp.

    Deletes the key at the specific timestamp. A timestamp in the past will delete the key immediately.

    key

    key

    timestamp

    an absolute Unix timestamp (milliseconds since January 1, 1970)

    returns

    true, if the timeout was set, false if the key didn't exist.

    Definition Classes
    Keys
    See also

    pExpire

  93. final def pSetEx[K, V](key: K, milliseconds: zio.Duration, value: V)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Unit]

    Set the value and expiration in milliseconds of a key.

    Set the value and expiration in milliseconds of a key.

    key

    Key of the string to set the expiry time on

    milliseconds

    Time in milliseconds until the string should expire

    value

    Value to set

    Definition Classes
    Strings
  94. final def pTtl[K](key: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, zio.Duration]

    Returns the remaining time to live of a key that has a timeout.

    Returns the remaining time to live of a key that has a timeout.

    key

    key

    returns

    remaining time to live of a key that has a timeout, error otherwise.

    Definition Classes
    Keys
  95. final def persist[K](key: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Boolean]

    Remove the existing timeout on key.

    Remove the existing timeout on key.

    key

    key

    returns

    true if timeout was removed, false if key does not exist or does not have an associated timeout.

    Definition Classes
    Keys
  96. final def pfAdd[K, V](key: K, element: V, elements: V*)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Boolean]

    Adds the specified elements to the specified HyperLogLog.

    Adds the specified elements to the specified HyperLogLog.

    key

    HLL key where the elements will be added

    element

    element to count

    elements

    additional elements to count

    returns

    boolean indicating if at least 1 HyperLogLog register was altered.

    Definition Classes
    HyperLogLog
  97. final def pfCount[K](key: K, keys: K*)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).

    Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).

    key

    HLL key

    keys

    additional keys

    returns

    approximate number of unique elements observed via PFADD.

    Definition Classes
    HyperLogLog
  98. final def pfMerge[K](destKey: K, sourceKey: K, sourceKeys: K*)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Unit]

    Merge N different HyperLogLogs into a single one.

    Merge N different HyperLogLogs into a single one.

    destKey

    HLL key where the merged HLLs will be stored

    sourceKey

    HLL key to merge

    sourceKeys

    additional keys to merge

    Definition Classes
    HyperLogLog
  99. final def ping(message: Option[String] = None): ZIO[Redis, RedisError, String]

    Pings the server.

    Pings the server.

    message

    the optional message to receive back from server

    returns

    PONG if no argument is provided, otherwise return a copy of the argument as a bulk. This command is often used to test if a connection is still alive, or to measure latency.

    Definition Classes
    Connection
  100. final def quit: ZIO[Redis, RedisError, Unit]

    Ask the server to close the connection.

    Ask the server to close the connection. The connection is closed as soon as all pending replies have been written to the client

    returns

    the Unit value.

    Definition Classes
    Connection
  101. final def rPop[K](key: K)(implicit arg0: Schema[K]): ResultBuilder1[Option]

    Removes and returns the last element in the list stored at key.

    Removes and returns the last element in the list stored at key.

    key

    the key identifier

    returns

    the value of the last element, or empty when key does not exist.

    Definition Classes
    Lists
  102. final def rPopLPush[S, D](source: S, destination: D)(implicit arg0: Schema[S], arg1: Schema[D]): ResultBuilder1[Option]

    Atomically removes the last element in the list stored at source, prepends it to the list stored at destination and returns it.

    Atomically removes the last element in the list stored at source, prepends it to the list stored at destination and returns it. If source and destination are the same, the operation is equivalent to removing the last element from the list and pushing it as first element of the same list, so it can be considered as a list rotation command.

    source

    the key identifier of the source list

    destination

    the key identifier of the destination list

    returns

    the element being popped and pushed. If source does not exist, empty is returned and no operation is performed.

    Definition Classes
    Lists
  103. final def rPush[K, V](key: K, element: V, elements: V*)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Long]

    Appends one or more elements to the list stored at key.

    Appends one or more elements to the list stored at key. If key does not exist, it is created as empty list before performing the push operation.

    key

    the key identifier

    element

    the first element to append

    elements

    the rest of elements to append

    returns

    the length of the list after the push operation.

    Definition Classes
    Lists
  104. final def rPushX[K, V](key: K, element: V, elements: V*)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Long]

    Appends on or multiple elements to the list stored at key, only if the list exists.

    Appends on or multiple elements to the list stored at key, only if the list exists. In contrary to zio.redis.api.Lists#rPush, no operation will be performed when key does not yet exist.

    key

    the key identifier

    element

    the first element to append

    elements

    the rest of elements to append

    returns

    the length of the list after the push operation.

    Definition Classes
    Lists
  105. final def randomKey: ResultBuilder1[Option]

    Return a random key from the currently selected database.

    Return a random key from the currently selected database.

    returns

    key or None when the database is empty.

    Definition Classes
    Keys
  106. final def rename[K](key: K, newKey: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Unit]

    Renames key to newKey.

    Renames key to newKey. It returns an error when key does not exist. If newKey already exists it is overwritten.

    key

    key to be renamed

    newKey

    new name

    returns

    unit if successful, error otherwise.

    Definition Classes
    Keys
  107. final def renameNx[K](key: K, newKey: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Boolean]

    Renames key to newKey if newKey does not yet exist.

    Renames key to newKey if newKey does not yet exist. It returns an error when key does not exist.

    key

    key to be renamed

    newKey

    new name

    returns

    true if key was renamed to newKey, false if newKey already exists.

    Definition Classes
    Keys
  108. final def reset: ZIO[Redis, RedisError, Unit]

    Performs a full reset of the connection's server-side context, mimicking the effects of disconnecting and reconnecting again

    Performs a full reset of the connection's server-side context, mimicking the effects of disconnecting and reconnecting again

    returns

    the Unit value.

    Definition Classes
    Connection
  109. final def restore[K](key: K, ttl: Long, value: Chunk[Byte], replace: Option[Replace] = None, absTtl: Option[AbsTtl] = None, idleTime: Option[IdleTime] = None, freq: Option[Freq] = None)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Unit]

    Create a key associated with a value that is obtained by deserializing the provided serialized value.

    Create a key associated with a value that is obtained by deserializing the provided serialized value. Error when key already exists unless you use the REPLACE option.

    key

    key

    ttl

    time to live in milliseconds, 0 if without any expire

    value

    serialized value

    replace

    replace option, replace if existing

    absTtl

    absolute ttl option, ttl should represent an absolute Unix timestamp (in milliseconds) in which the key will expire

    idleTime

    idle time based eviction policy

    freq

    frequency based eviction policy

    returns

    unit on success.

    Definition Classes
    Keys
  110. final def sAdd[K, M](key: K, member: M, members: M*)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Long]

    Add one or more members to a set.

    Add one or more members to a set.

    key

    Key of set to add to

    member

    first member to add

    members

    subsequent members to add

    returns

    Returns the number of elements that were added to the set, not including all the elements already present into the set.

    Definition Classes
    Sets
  111. final def sCard[K](key: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Get the number of members in a set.

    Get the number of members in a set.

    key

    Key of set to get the number of members of

    returns

    Returns the cardinality (number of elements) of the set, or 0 if key does not exist.

    Definition Classes
    Sets
  112. final def sDiff[K](key: K, keys: K*)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Subtract multiple sets.

    Subtract multiple sets.

    key

    Key of the set to subtract from

    keys

    Keys of the sets to subtract

    returns

    Returns the members of the set resulting from the difference between the first set and all the successive sets.

    Definition Classes
    Sets
  113. final def sDiffStore[D, K](destination: D, key: K, keys: K*)(implicit arg0: Schema[D], arg1: Schema[K]): ZIO[Redis, RedisError, Long]

    Subtract multiple sets and store the resulting set in a key.

    Subtract multiple sets and store the resulting set in a key.

    destination

    Key of set to store the resulting set

    key

    Key of set to be subtracted from

    keys

    Keys of sets to subtract

    returns

    Returns the number of elements in the resulting set.

    Definition Classes
    Sets
  114. final def sInter[K](destination: K, keys: K*)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Intersect multiple sets and store the resulting set in a key.

    Intersect multiple sets and store the resulting set in a key.

    destination

    Key of set to store the resulting set

    keys

    Keys of the sets to intersect with each other

    returns

    Returns the members of the set resulting from the intersection of all the given sets.

    Definition Classes
    Sets
  115. final def sInterStore[D, K](destination: D, key: K, keys: K*)(implicit arg0: Schema[D], arg1: Schema[K]): ZIO[Redis, RedisError, Long]

    Intersect multiple sets and store the resulting set in a key.

    Intersect multiple sets and store the resulting set in a key.

    destination

    Key of set to store the resulting set

    key

    Key of first set to intersect

    keys

    Keys of subsequent sets to intersect

    returns

    Returns the number of elements in the resulting set.

    Definition Classes
    Sets
  116. final def sIsMember[K, M](key: K, member: M)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Boolean]

    Determine if a given value is a member of a set.

    Determine if a given value is a member of a set.

    key

    of the set

    member

    value which should be searched in the set

    returns

    Returns 1 if the element is a member of the set. 0 if the element is not a member of the set, or if key does not exist.

    Definition Classes
    Sets
  117. final def sMembers[K](key: K)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Get all the members in a set.

    Get all the members in a set.

    key

    Key of the set to get the members of

    returns

    Returns the members of the set.

    Definition Classes
    Sets
  118. final def sMove[S, D, M](source: S, destination: D, member: M)(implicit arg0: Schema[S], arg1: Schema[D], arg2: Schema[M]): ZIO[Redis, RedisError, Boolean]

    Move a member from one set to another.

    Move a member from one set to another.

    source

    Key of the set to move the member from

    destination

    Key of the set to move the member to

    member

    Element to move

    returns

    Returns 1 if the element was moved. 0 if it was not found.

    Definition Classes
    Sets
  119. final def sPop[K](key: K, count: Option[Long] = None)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Remove and return one or multiple random members from a set.

    Remove and return one or multiple random members from a set.

    key

    Key of the set to remove items from

    count

    Number of elements to remove

    returns

    Returns the elements removed.

    Definition Classes
    Sets
  120. final def sRandMember[K](key: K, count: Option[Long] = None)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Get one or multiple random members from a set.

    Get one or multiple random members from a set.

    key

    Key of the set to get members from

    count

    Number of elements to randomly get

    returns

    Returns the random members.

    Definition Classes
    Sets
  121. final def sRem[K, M](key: K, member: M, members: M*)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Long]

    Remove one of more members from a set.

    Remove one of more members from a set.

    key

    Key of the set to remove members from

    member

    Value of the first element to remove

    members

    Subsequent values of elements to remove

    returns

    Returns the number of members that were removed from the set, not including non existing members.

    Definition Classes
    Sets
  122. final def sScan[K](key: K, cursor: Long, pattern: Option[String] = None, count: Option[Count] = None)(implicit arg0: Schema[K]): ResultBuilder1[[x](Long, Chunk[x])]

    Incrementally iterate Set elements.

    Incrementally iterate Set elements.

    This is a cursor based scan of an entire set. Call initially with cursor set to 0 and on subsequent calls pass the return value as the next cursor.

    key

    Key of the set to scan

    cursor

    Cursor to use for this iteration of scan

    pattern

    Glob-style pattern that filters which elements are returned

    count

    Count of elements. Roughly this number will be returned by Redis if possible

    returns

    Returns the next cursor, and items for this iteration or nothing when you reach the end, as a tuple.

    Definition Classes
    Sets
  123. final def sUnion[K](key: K, keys: K*)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Add multiple sets.

    Add multiple sets.

    key

    Key of the first set to add

    keys

    Keys of the subsequent sets to add

    returns

    Returns a list with members of the resulting set.

    Definition Classes
    Sets
  124. final def sUnionStore[D, K](destination: D, key: K, keys: K*)(implicit arg0: Schema[D], arg1: Schema[K]): ZIO[Redis, RedisError, Long]

    Add multiple sets and add the resulting set in a key.

    Add multiple sets and add the resulting set in a key.

    destination

    Key of destination to store the result

    key

    Key of first set to add

    keys

    Subsequent keys of sets to add

    returns

    Returns the number of elements in the resulting set.

    Definition Classes
    Sets
  125. final def scan(cursor: Long, pattern: Option[String] = None, count: Option[Count] = None, type: Option[RedisType] = None): ResultBuilder1[[x](Long, Chunk[x])]

    Iterates the set of keys in the currently selected Redis database.

    Iterates the set of keys in the currently selected Redis database. An iteration starts when the cursor is set to 0, and terminates when the cursor returned by the server is 0.

    cursor

    cursor value, starts with zero

    pattern

    key pattern

    count

    count option, specifies number of returned elements per call

    returns

    returns an updated cursor that the user needs to use as the cursor argument in the next call along with the values.

    Definition Classes
    Keys
  126. def scriptExists(sha1: String, sha1s: String*): ZIO[Redis, RedisError, Chunk[Boolean]]

    Checks existence of the scripts in the script cache.

    Checks existence of the scripts in the script cache.

    sha1

    one required SHA1 digest

    sha1s

    maybe rest of the SHA1 digests

    returns

    for every corresponding SHA1 digest of a script that actually exists in the script cache, an true is returned, otherwise false is returned.

    Definition Classes
    Scripting
  127. def scriptLoad(script: String): ZIO[Redis, RedisError, String]

    Loads a script into the scripts cache.

    Loads a script into the scripts cache. After the script is loaded into the script cache it could be evaluated using the zio.redis.api.Scripting.evalSha method.

    script

    Lua script

    returns

    the SHA1 digest of the script added into the script cache.

    Definition Classes
    Scripting
  128. final def select(index: Long): ZIO[Redis, RedisError, Unit]

    Changes the database for the current connection to the database having the specified numeric index.

    Changes the database for the current connection to the database having the specified numeric index. The currently selected database is a property of the connection; clients should track the selected database and re-select it on reconnection.

    index

    the database index. The index is zero-based. New connections always use the database 0

    returns

    the Unit value.

    Definition Classes
    Connection
  129. final def set[K, V](key: K, value: V, expireTime: Option[zio.Duration] = None, update: Option[Update] = None, keepTtl: Option[KeepTtl] = None)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Boolean]

    Set the string value of a key.

    Set the string value of a key.

    key

    Key of the string to set

    value

    Value to set

    expireTime

    Time until the string expires

    update

    Update can be Update.SetExisting which only sets the key if it exists, or Update.SetNew which nly sets the key if it does not exist

    keepTtl

    When set any previously set expire time remains unchanged

    returns

    true if set was executed correctly, false otherwise.

    Definition Classes
    Strings
  130. final def setBit[K](key: K, offset: Long, value: Boolean)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Boolean]

    Sets or clears the bit at offset in the string value stored at key.

    Sets or clears the bit at offset in the string value stored at key.

    key

    Key of the string to set or clear bits

    offset

    Offset at which to set or clear the bit

    value

    True if bit should be set, False if it should be cleared

    returns

    Returns the original bit value stored at offset.

    Definition Classes
    Strings
  131. final def setEx[K, V](key: K, expiration: zio.Duration, value: V)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Unit]

    Set the value and expiration of a key.

    Set the value and expiration of a key.

    key

    Key of the value to update

    expiration

    Expiration time for the value

    value

    New value to set

    Definition Classes
    Strings
  132. final def setNx[K, V](key: K, value: V)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Boolean]

    Set the value of a key, only if the key does not exist.

    Set the value of a key, only if the key does not exist.

    key

    Key of the value to set if the key does not exist

    value

    Value to set

    returns

    Returns 1 if the key was set. 0 if the key was not set.

    Definition Classes
    Strings
  133. final def setRange[K, V](key: K, offset: Long, value: V)(implicit arg0: Schema[K], arg1: Schema[V]): ZIO[Redis, RedisError, Long]

    Overwrite part of a string at key starting at the specified offset.

    Overwrite part of a string at key starting at the specified offset.

    key

    Key of the string to overwite

    offset

    Offset to start writing

    value

    Value to overwrite with

    returns

    Returns the length of the string after it was modified by the command.

    Definition Classes
    Strings
  134. final def sort[K](key: K, by: Option[String] = None, limit: Option[Limit] = None, order: Order = Order.Ascending, get: Option[(String, List[String])] = None, alpha: Option[Alpha] = None)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Sorts the list, set, or sorted set stored at key.

    Sorts the list, set, or sorted set stored at key. Returns the sorted elements.

    key

    key

    by

    by option, specifies a pattern to use as an external key

    limit

    limit option, take only limit values, starting at position offset

    order

    ordering option, sort descending instead of ascending

    get

    get option, return the values referenced by the keys generated from the get patterns

    alpha

    alpha option, sort the values alphanumerically, instead of by interpreting the value as floating point number

    returns

    the sorted values, or the values found using the get patterns.

    Definition Classes
    Keys
  135. final def sortStore[K](key: K, storeAt: Store, by: Option[String] = None, limit: Option[Limit] = None, order: Order = Order.Ascending, get: Option[(String, List[String])] = None, alpha: Option[Alpha] = None)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Sorts the list, set, or sorted set stored at key.

    Sorts the list, set, or sorted set stored at key. Stores the results at storeAt. Returns the number of values sorted.

    The functions sort and sortStore are both implemented by the Redis command SORT. Because they have different return types, they are split into two Scala functions.

    key

    key

    storeAt

    where to store the results

    by

    by option, specifies a pattern to use as an external key

    limit

    limit option, take only limit values, starting at position offset

    order

    ordering option, sort descending instead of ascending

    get

    get option, return the values referenced by the keys generated from the get patterns

    alpha

    alpha option, sort the values alphanumerically, instead of by interpreting the value as floating point number

    returns

    the sorted values, or the values found using the get patterns.

    Definition Classes
    Keys
  136. final def strLen[K](key: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Get the length of a value stored in a key.

    Get the length of a value stored in a key.

    key

    Key of the string to get the length of

    returns

    Returns the length of the string.

    Definition Classes
    Strings
  137. final def stralgoLcs[K](command: StrAlgoLCS, keyA: K, keyB: K, lcsQueryType: Option[StrAlgoLcsQueryType] = None)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, LcsOutput]

    Get the longest common subsequence of values stored in the given keys.

    Get the longest common subsequence of values stored in the given keys.

    command

    type of value it (possible values are Strings and Keys)

    keyA

    first value that will contain subsequence

    keyB

    second value that will contain subsequence

    lcsQueryType

    modifier that will affect the output

    returns

    Without modifiers returns the string representing the longest common substring. When LEN is given the command returns the length of the longest common substring. When IDX is given the command returns an array with the LCS length and all the ranges in both the strings, start and end offset for each string, where there are matches. When withMatchLen is given each array representing a match will also have the length of the match (see examples).

    Definition Classes
    Strings
  138. final def touch[K](key: K, keys: K*)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Alters the last access time of a key(s).

    Alters the last access time of a key(s). A key is ignored if it does not exist.

    key

    one required key

    keys

    maybe rest of the keys

    returns

    The number of keys that were touched.

    Definition Classes
    Keys
  139. final def ttl[K](key: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, zio.Duration]

    Returns the remaining time to live of a key that has a timeout.

    Returns the remaining time to live of a key that has a timeout.

    key

    key

    returns

    remaining time to live of a key that has a timeout, error otherwise.

    Definition Classes
    Keys
  140. final def typeOf[K](key: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, RedisType]

    Returns the string representation of the type of the value stored at key.

    Returns the string representation of the type of the value stored at key.

    key

    key

    returns

    type of the value stored at key.

    Definition Classes
    Keys
  141. final def unlink[K](key: K, keys: K*)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Removes the specified keys.

    Removes the specified keys. A key is ignored if it does not exist. The command performs the actual memory reclaiming in a different thread, so it is not blocking.

    key

    one required key

    keys

    maybe rest of the keys

    returns

    The number of keys that were unlinked.

    Definition Classes
    Keys
    See also

    del

  142. final def wait_(replicas: Long, timeout: zio.Duration): ZIO[Redis, RedisError, Long]

    This command blocks the current client until all the previous write commands are successfully transferred and acknowledged by at least the specified number of replicas.

    This command blocks the current client until all the previous write commands are successfully transferred and acknowledged by at least the specified number of replicas.

    replicas

    minimum replicas to reach

    timeout

    specified as a Duration, 0 means to block forever

    returns

    the number of replicas reached both in case of failure and success.

    Definition Classes
    Keys
  143. final def xAck[SK, G, I](key: SK, group: G, id: I, ids: I*)(implicit arg0: Schema[SK], arg1: Schema[G], arg2: Schema[I]): ZIO[Redis, RedisError, Long]

    Removes one or multiple messages from the pending entries list (PEL) of a stream consumer group.

    Removes one or multiple messages from the pending entries list (PEL) of a stream consumer group.

    key

    ID of the stream

    group

    ID of the consumer group

    id

    ID of the message

    ids

    IDs of the rest of the messages

    returns

    the number of messages successfully acknowledged.

    Definition Classes
    Streams
  144. final def xAdd[SK, I, K, V](key: SK, id: I, pair: (K, V), pairs: (K, V)*)(implicit arg0: Schema[SK], arg1: Schema[I], arg2: Schema[K], arg3: Schema[V]): ResultBuilder1[Id]

    Appends the specified stream entry to the stream at the specified key.

    Appends the specified stream entry to the stream at the specified key.

    key

    ID of the stream

    id

    ID of the message

    pair

    field and value pair

    pairs

    rest of the field and value pairs

    returns

    ID of the added entry.

    Definition Classes
    Streams
  145. final def xAddWithMaxLen[SK, I, K, V](key: SK, id: I, count: Long, approximate: Boolean = false)(pair: (K, V), pairs: (K, V)*)(implicit arg0: Schema[SK], arg1: Schema[I], arg2: Schema[K], arg3: Schema[V]): ResultBuilder1[Id]

    Appends the specified stream entry to the stream at the specified key while limiting the size of the stream.

    Appends the specified stream entry to the stream at the specified key while limiting the size of the stream.

    key

    ID of the stream

    id

    ID of the message

    count

    maximum number of elements in a stream

    approximate

    flag that indicates if a stream should be limited to the exact number of elements

    pair

    field and value pair

    pairs

    rest of the field and value pairs

    returns

    ID of the added entry.

    Definition Classes
    Streams
  146. final def xClaim[SK, SG, SC, I](key: SK, group: SG, consumer: SC, minIdleTime: zio.Duration, idle: Option[zio.Duration] = None, time: Option[zio.Duration] = None, retryCount: Option[Long] = None, force: Boolean = false)(id: I, ids: I*)(implicit arg0: Schema[SK], arg1: Schema[SG], arg2: Schema[SC], arg3: Schema[I]): ResultBuilder2[[x, y]Chunk[StreamEntry[I, x, y]]]

    Changes the ownership of a pending message.

    Changes the ownership of a pending message.

    key

    ID of the stream

    group

    ID of the consumer group

    consumer

    ID of the consumer

    minIdleTime

    minimum idle time of a message

    idle

    idle time (last time it was delivered) of the message that will be set

    time

    same as idle but instead of a relative amount of milliseconds, it sets the idle time to a specific Unix time (in milliseconds)

    retryCount

    retry counter of a message that will be set

    force

    flag that indicates that a message doesn't have to be in a pending entries list (PEL)

    id

    ID of a message

    ids

    IDs of the rest of the messages

    returns

    messages successfully claimed.

    Definition Classes
    Streams
  147. final def xClaimWithJustId[SK, SG, SC, I](key: SK, group: SG, consumer: SC, minIdleTime: zio.Duration, idle: Option[zio.Duration] = None, time: Option[zio.Duration] = None, retryCount: Option[Long] = None, force: Boolean = false)(id: I, ids: I*)(implicit arg0: Schema[SK], arg1: Schema[SG], arg2: Schema[SC], arg3: Schema[I]): ResultBuilder1[Chunk]

    Changes the ownership of a pending message.

    Changes the ownership of a pending message.

    key

    ID of the stream

    group

    ID of the consumer group

    consumer

    ID of the consumer

    minIdleTime

    minimum idle time of a message

    idle

    idle time (last time it was delivered) of the message that will be set

    time

    same as idle but instead of a relative amount of milliseconds, it sets the idle time to a specific Unix time (in milliseconds)

    retryCount

    retry counter of a message that will be set

    force

    flag that indicates that a message doesn't have to be in a pending entries list (PEL)

    id

    ID of a message

    ids

    IDs of the rest of the messages

    returns

    IDs of the messages that are successfully claimed.

    Definition Classes
    Streams
  148. final def xDel[SK, I](key: SK, id: I, ids: I*)(implicit arg0: Schema[SK], arg1: Schema[I]): ZIO[Redis, RedisError, Long]

    Removes the specified entries from a stream.

    Removes the specified entries from a stream.

    key

    ID of the stream

    id

    ID of the message

    ids

    IDs of the rest of the messages

    returns

    the number of entries deleted.

    Definition Classes
    Streams
  149. final def xGroupCreate[SK, SG, I](key: SK, group: SG, id: I, mkStream: Boolean = false)(implicit arg0: Schema[SK], arg1: Schema[SG], arg2: Schema[I]): ZIO[Redis, RedisError, Unit]

    Create a new consumer group associated with a stream.

    Create a new consumer group associated with a stream.

    key

    ID of the stream

    group

    ID of the consumer group

    id

    ID of the last item in the stream to consider already delivered

    mkStream

    ID of the last item in the stream to consider already delivered

    Definition Classes
    Streams
  150. final def xGroupCreateConsumer[SK, SG, SC](key: SK, group: SG, consumer: SC)(implicit arg0: Schema[SK], arg1: Schema[SG], arg2: Schema[SC]): ZIO[Redis, RedisError, Boolean]

    Create a new consumer associated with a consumer group.

    Create a new consumer associated with a consumer group.

    key

    ID of the stream

    group

    ID of the consumer group

    consumer

    ID of the consumer

    returns

    the number of created consumer groups.

    Definition Classes
    Streams
  151. final def xGroupDelConsumer[SK, SG, SC](key: SK, group: SG, consumer: SC)(implicit arg0: Schema[SK], arg1: Schema[SG], arg2: Schema[SC]): ZIO[Redis, RedisError, Long]

    Remove a specific consumer from a consumer group.

    Remove a specific consumer from a consumer group.

    key

    ID of the stream

    group

    ID of the consumer group

    consumer

    ID of the consumer

    returns

    the number of pending messages that the consumer had before it was deleted.

    Definition Classes
    Streams
  152. final def xGroupDestroy[SK, SG](key: SK, group: SG)(implicit arg0: Schema[SK], arg1: Schema[SG]): ZIO[Redis, RedisError, Boolean]

    Destroy a consumer group.

    Destroy a consumer group.

    key

    ID of the stream

    group

    ID of the consumer group

    returns

    flag that indicates if the deletion was successful.

    Definition Classes
    Streams
  153. final def xGroupSetId[SK, SG, I](key: SK, group: SG, id: I)(implicit arg0: Schema[SK], arg1: Schema[SG], arg2: Schema[I]): ZIO[Redis, RedisError, Unit]

    Set the consumer group last delivered ID to something else.

    Set the consumer group last delivered ID to something else.

    key

    ID of the stream

    group

    ID of the consumer group

    id

    last delivered ID to set

    Definition Classes
    Streams
  154. final def xInfoConsumers[SK, SG](key: SK, group: SG)(implicit arg0: Schema[SK], arg1: Schema[SG]): ZIO[Redis, RedisError, Chunk[StreamConsumersInfo]]

    An introspection command used in order to retrieve different information about the consumers.

    An introspection command used in order to retrieve different information about the consumers.

    key

    ID of the stream

    group

    ID of the consumer group

    returns

    List of every consumer in a specific consumer group.

    Definition Classes
    Streams
  155. final def xInfoGroups[SK](key: SK)(implicit arg0: Schema[SK]): ZIO[Redis, RedisError, Chunk[StreamGroupsInfo]]

    An introspection command used in order to retrieve different information about the group.

    An introspection command used in order to retrieve different information about the group.

    key

    ID of the stream

    returns

    List of consumer groups associated with the stream stored at the specified key.

    Definition Classes
    Streams
  156. final def xInfoStream[SK](key: SK)(implicit arg0: Schema[SK]): ResultBuilder3[StreamInfo]

    An introspection command used in order to retrieve different information about the stream.

    An introspection command used in order to retrieve different information about the stream.

    key

    ID of the stream

    returns

    General information about the stream stored at the specified key.

    Definition Classes
    Streams
  157. final def xInfoStreamFull[SK](key: SK, count: Long)(implicit arg0: Schema[SK]): ResultBuilder3[FullStreamInfo]

    Returns the entire state of the stream, including entries, groups, consumers and PELs.

    Returns the entire state of the stream, including entries, groups, consumers and PELs.

    key

    ID of the stream

    count

    limit the amount of stream/PEL entries that are returned (The first <count> entries are returned)

    returns

    General information about the stream stored at the specified key.

    Definition Classes
    Streams
  158. final def xInfoStreamFull[SK](key: SK)(implicit arg0: Schema[SK]): ResultBuilder3[FullStreamInfo]

    Returns the entire state of the stream, including entries, groups, consumers and PELs.

    Returns the entire state of the stream, including entries, groups, consumers and PELs.

    key

    ID of the stream

    returns

    General information about the stream stored at the specified key.

    Definition Classes
    Streams
  159. final def xLen[SK](key: SK)(implicit arg0: Schema[SK]): ZIO[Redis, RedisError, Long]

    Fetches the number of entries inside a stream.

    Fetches the number of entries inside a stream.

    key

    ID of the stream

    returns

    the number of entries inside a stream.

    Definition Classes
    Streams
  160. final def xPending[SK, SG, I, SC](key: SK, group: SG, start: I, end: I, count: Long, consumer: Option[SC] = None, idle: Option[zio.Duration] = None)(implicit arg0: Schema[SK], arg1: Schema[SG], arg2: Schema[I], arg3: Schema[SC]): ZIO[Redis, RedisError, Chunk[PendingMessage]]

    Inspects the list of pending messages.

    Inspects the list of pending messages.

    key

    ID of the stream

    group

    ID of the consumer group

    start

    start of the range of IDs

    end

    end of the range of IDs

    count

    maximum number of messages returned

    consumer

    ID of the consumer

    idle

    idle time of a pending message by which message are filtered

    returns

    detailed information for each message in the pending entries list.

    Definition Classes
    Streams
  161. final def xPending[SK, SG](key: SK, group: SG)(implicit arg0: Schema[SK], arg1: Schema[SG]): ZIO[Redis, RedisError, PendingInfo]

    Inspects the list of pending messages.

    Inspects the list of pending messages.

    key

    ID of the stream

    group

    ID of the consumer group

    returns

    summary about the pending messages in a given consumer group.

    Definition Classes
    Streams
  162. final def xRange[SK, I](key: SK, start: I, end: I, count: Long)(implicit arg0: Schema[SK], arg1: Schema[I]): ResultBuilder2[[x, y]Chunk[StreamEntry[I, x, y]]]

    Fetches the stream entries matching a given range of IDs.

    Fetches the stream entries matching a given range of IDs.

    key

    ID of the stream

    start

    start of the range of IDs

    end

    end of the range of IDs

    count

    maximum number of entries returned

    returns

    the complete entries with IDs matching the specified range.

    Definition Classes
    Streams
  163. final def xRange[SK, I](key: SK, start: I, end: I)(implicit arg0: Schema[SK], arg1: Schema[I]): ResultBuilder2[[x, y]Chunk[StreamEntry[I, x, y]]]

    Fetches the stream entries matching a given range of IDs.

    Fetches the stream entries matching a given range of IDs.

    key

    ID of the stream

    start

    start of the range of IDs

    end

    end of the range of IDs

    returns

    the complete entries with IDs matching the specified range.

    Definition Classes
    Streams
  164. final def xRead[SK, I](count: Option[Long] = None, block: Option[zio.Duration] = None)(stream: (SK, I), streams: (SK, I)*)(implicit arg0: Schema[SK], arg1: Schema[I]): ResultBuilder2[[x, y]Chunk[StreamChunk[SK, I, x, y]]]

    Read data from one or multiple streams.

    Read data from one or multiple streams.

    count

    maximum number of elements returned per stream

    block

    duration for which we want to block before timing out

    stream

    pair that contains stream ID and the last ID that the consumer received for that stream

    streams

    rest of the pairs

    returns

    complete entries with an ID greater than the last received ID per stream.

    Definition Classes
    Streams
  165. final def xReadGroup[SG, SC, SK, I](group: SG, consumer: SC, count: Option[Long] = None, block: Option[zio.Duration] = None, noAck: Boolean = false)(stream: (SK, I), streams: (SK, I)*)(implicit arg0: Schema[SG], arg1: Schema[SC], arg2: Schema[SK], arg3: Schema[I]): ResultBuilder2[[x, y]Chunk[StreamChunk[SK, I, x, y]]]

    Read data from one or multiple streams using consumer group.

    Read data from one or multiple streams using consumer group.

    group

    ID of the consumer group

    consumer

    ID of the consumer

    count

    maximum number of elements returned per stream

    block

    duration for which we want to block before timing out

    noAck

    flag that indicates that the read messages shouldn't be added to the pending entries list (PEL)

    stream

    pair that contains stream ID and the last ID that the consumer received for that stream

    streams

    rest of the pairs

    returns

    complete entries with an ID greater than the last received ID per stream.

    Definition Classes
    Streams
  166. final def xRevRange[SK, I](key: SK, end: I, start: I, count: Long)(implicit arg0: Schema[SK], arg1: Schema[I]): ResultBuilder2[[x, y]Chunk[StreamEntry[I, x, y]]]

    Fetches the stream entries matching a given range of IDs in the reverse order.

    Fetches the stream entries matching a given range of IDs in the reverse order.

    key

    ID of the stream

    end

    end of the range of IDs

    start

    start of the range of IDs

    count

    maximum number of entries returned

    returns

    the complete entries with IDs matching the specified range in the reverse order.

    Definition Classes
    Streams
  167. final def xRevRange[SK, I](key: SK, end: I, start: I)(implicit arg0: Schema[SK], arg1: Schema[I]): ResultBuilder2[[x, y]Chunk[StreamEntry[I, x, y]]]

    Fetches the stream entries matching a given range of IDs in the reverse order.

    Fetches the stream entries matching a given range of IDs in the reverse order.

    key

    ID of the stream

    end

    end of the range of IDs

    start

    start of the range of IDs

    returns

    the complete entries with IDs matching the specified range in the reverse order.

    Definition Classes
    Streams
  168. final def xTrim[SK](key: SK, count: Long, approximate: Boolean = false)(implicit arg0: Schema[SK]): ZIO[Redis, RedisError, Long]

    Trims the stream to a given number of items, evicting older items (items with lower IDs) if needed.

    Trims the stream to a given number of items, evicting older items (items with lower IDs) if needed.

    key

    ID of the stream

    count

    stream length

    approximate

    flag that indicates if the stream length should be exactly count or few tens of entries more

    returns

    the number of entries deleted from the stream.

    Definition Classes
    Streams
  169. final def zAdd[K, M](key: K, update: Option[Update] = None, change: Option[Changed] = None)(memberScore: MemberScore[M], memberScores: MemberScore[M]*)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Long]

    Add one or more members to a sorted set, or update its score if it already exists.

    Add one or more members to a sorted set, or update its score if it already exists.

    key

    Key of set to add to

    update

    Set existing and never add elements or always set new elements and don't update existing elements

    change

    Modify the return value from the number of new elements added, to the total number of elements change

    memberScore

    Score that should be added to specific element for a given sorted set key

    memberScores

    Rest scores that should be added to specific elements fr a given sorted set key

    returns

    The number of elements added to the sorted set, not including elements already existing for which the score was updated.

    Definition Classes
    SortedSets
  170. final def zAddWithIncr[K, M](key: K, update: Option[Update] = None, change: Option[Changed] = None)(increment: Increment, memberScore: MemberScore[M], memberScores: MemberScore[M]*)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Option[Double]]

    Add one or more members to a sorted set, or update its score if it already exists.

    Add one or more members to a sorted set, or update its score if it already exists.

    key

    Key of set to add to.

    update

    Set existing and never add elements or always set new elements and don't update existing elements

    change

    Modify the return value from the number of new elements added, to the total number of elements change

    increment

    When this option is specified ZADD acts like ZINCRBY. Only one score-element pair can be specified in this mode

    memberScore

    Score that should be added to specific element for a given sorted set key

    memberScores

    Rest scores that should be added to specific elements fr a given sorted set key

    returns

    The new score of member (a double precision floating point number), or None if the operation was aborted (when called with either the XX or the NX option).

    Definition Classes
    SortedSets
  171. final def zCard[K](key: K)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Get the number of members in a sorted set.

    Get the number of members in a sorted set.

    key

    Key of a sorted set

    returns

    The cardinality (number of elements) of the sorted set, or 0 if key does not exist.

    Definition Classes
    SortedSets
  172. final def zCount[K](key: K, range: Range)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Returns the number of elements in the sorted set at key with a score between min and max.

    Returns the number of elements in the sorted set at key with a score between min and max.

    key

    Key of a sorted set

    range

    Min and max score (including elements with score equal to min or max)

    returns

    the number of elements in the specified score range.

    Definition Classes
    SortedSets
  173. final def zDiff[K](inputKeysNum: Long, key: K, keys: K*)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Subtract multiple sorted sets and return members.

    Subtract multiple sorted sets and return members.

    inputKeysNum

    Number of input keys

    key

    Key of a sorted set

    keys

    Keys of other sorted sets

    returns

    Chunk of differences between the first and successive input sorted sets.

    Definition Classes
    SortedSets
  174. final def zDiffStore[DK, K](destination: DK, inputKeysNum: Long, key: K, keys: K*)(implicit arg0: Schema[DK], arg1: Schema[K]): ZIO[Redis, RedisError, Long]

    Subtract multiple sorted sets and store the resulting sorted set in a destination key.

    Subtract multiple sorted sets and store the resulting sorted set in a destination key.

    destination

    Key of the output

    inputKeysNum

    Number of input keys

    key

    Key of a sorted set

    keys

    Keys of other sorted sets

    returns

    Chunk of differences between the first and successive input sorted sets.

    Definition Classes
    SortedSets
  175. final def zDiffWithScores[K](inputKeysNum: Long, key: K, keys: K*)(implicit arg0: Schema[K]): ResultBuilder1[MemberScores]

    Subtract multiple sorted sets and return members and their associated score.

    Subtract multiple sorted sets and return members and their associated score.

    inputKeysNum

    Number of input keys

    key

    Key of a sorted set

    keys

    Keys of other sorted sets

    returns

    Chunk of differences and scores between the first and successive input sorted sets.

    Definition Classes
    SortedSets
  176. final def zIncrBy[K, M](key: K, increment: Long, member: M)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Double]

    Increment the score of a member in a sorted set.

    Increment the score of a member in a sorted set.

    key

    Key of a sorted set

    increment

    Increment value

    member

    Member of sorted set

    returns

    The new score of member (a double precision floating point number).

    Definition Classes
    SortedSets
  177. final def zInter[K](inputKeysNum: Long, key: K, keys: K*)(aggregate: Option[Aggregate] = None, weights: Option[::[Double]] = None)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Intersect multiple sorted sets and return members.

    Intersect multiple sorted sets and return members.

    inputKeysNum

    Number of input keys

    key

    Key of a sorted set

    keys

    Keys of the rest sorted sets

    aggregate

    With the AGGREGATE option, it is possible to specify how the results of the union are aggregated

    weights

    Represents WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set. This means that the score of every element in every input sorted set is multiplied by this factor before being passed to the aggregation function. When WEIGHTS is not given, the multiplication factors default to 1

    returns

    Chunk containing the intersection of members.

    Definition Classes
    SortedSets
  178. final def zInterStore[DK, K](destination: DK, inputKeysNum: Long, key: K, keys: K*)(aggregate: Option[Aggregate] = None, weights: Option[::[Double]] = None)(implicit arg0: Schema[DK], arg1: Schema[K]): ZIO[Redis, RedisError, Long]

    Intersect multiple sorted sets and store the resulting sorted set in a new key.

    Intersect multiple sorted sets and store the resulting sorted set in a new key.

    destination

    Key of the output

    inputKeysNum

    Number of input keys

    key

    Key of a sorted set

    keys

    Keys of the rest sorted sets

    aggregate

    With the AGGREGATE option, it is possible to specify how the results of the union are aggregated

    weights

    Represents WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set. This means that the score of every element in every input sorted set is multiplied by this factor before being passed to the aggregation function. When WEIGHTS is not given, the multiplication factors default to 1

    returns

    The number of elements in the resulting sorted set at destination.

    Definition Classes
    SortedSets
  179. final def zInterWithScores[K](inputKeysNum: Long, key: K, keys: K*)(aggregate: Option[Aggregate] = None, weights: Option[::[Double]] = None)(implicit arg0: Schema[K]): ResultBuilder1[MemberScores]

    Intersect multiple sorted sets and return members and their associated score.

    Intersect multiple sorted sets and return members and their associated score.

    inputKeysNum

    Number of input keys

    key

    Key of a sorted set

    keys

    Keys of the rest sorted sets

    aggregate

    With the AGGREGATE option, it is possible to specify how the results of the union are aggregated

    weights

    Represents WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set. This means that the score of every element in every input sorted set is multiplied by this factor before being passed to the aggregation function. When WEIGHTS is not given, the multiplication factors default to 1

    returns

    Chunk containing the intersection of members with their score.

    Definition Classes
    SortedSets
  180. final def zLexCount[K](key: K, lexRange: LexRange)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Count the number of members in a sorted set between a given lexicographical range.

    Count the number of members in a sorted set between a given lexicographical range.

    key

    Key of a sorted set

    lexRange

    LexRange that must be satisfied

    returns

    The number of elements in the specified score range.

    Definition Classes
    SortedSets
  181. final def zMScore[K](key: K, keys: K*)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Chunk[Option[Double]]]

    Returns the scores associated with the specified members in the sorted set stored at key.

    Returns the scores associated with the specified members in the sorted set stored at key.

    key

    Key of the set

    keys

    Keys of the rest sets

    returns

    List of scores or None associated with the specified member values (a double precision floating point number).

    Definition Classes
    SortedSets
  182. final def zPopMax[K](key: K, count: Option[Long] = None)(implicit arg0: Schema[K]): ResultBuilder1[MemberScores]

    Remove and return members with the highest scores in a sorted set.

    Remove and return members with the highest scores in a sorted set.

    key

    Key of a sorted set

    count

    When left unspecified, the default value for count is 1. Specifying a count value that is higher than the sorted set's cardinality will not produce an error. When returning multiple elements, the one with the highest score will be the first, followed by the elements with lower scores

    returns

    Chunk of popped elements and scores.

    Definition Classes
    SortedSets
  183. final def zPopMin[K](key: K, count: Option[Long] = None)(implicit arg0: Schema[K]): ResultBuilder1[MemberScores]

    Remove and return members with the lowest scores in a sorted set.

    Remove and return members with the lowest scores in a sorted set.

    key

    Key of a sorted set

    count

    When left unspecified, the default value for count is 1. Specifying a count value that is higher than the sorted set's cardinality will not produce an error. When returning multiple elements, the one with the lowest score will be the first, followed by the elements with greater scores

    returns

    Chunk of popped elements and scores.

    Definition Classes
    SortedSets
  184. final def zRandMember[K](key: K, count: Long)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Return random elements from the sorted set value stored at key.

    Return random elements from the sorted set value stored at key.

    key

    Key of a sorted set

    count

    If the provided count argument is positive, return an array of distinct elements. The array's length is either count or the sorted set's cardinality (ZCARD), whichever is lower

    returns

    Return an array of elements from the sorted set value stored at key.

    Definition Classes
    SortedSets
  185. final def zRandMember[K](key: K)(implicit arg0: Schema[K]): ResultBuilder1[Option]

    Return a random element from the sorted set value stored at key.

    Return a random element from the sorted set value stored at key.

    key

    Key of a sorted set

    returns

    Return a random element from the sorted set value stored at key.

    Definition Classes
    SortedSets
  186. final def zRandMemberWithScores[K](key: K, count: Long)(implicit arg0: Schema[K]): ResultBuilder1[MemberScores]

    Return random elements from the sorted set value stored at key.

    Return random elements from the sorted set value stored at key.

    key

    Key of a sorted set

    count

    If the provided count argument is positive, return an array of distinct elements. The array's length is either count or the sorted set's cardinality (ZCARD), whichever is lower

    returns

    When the additional count argument is passed, the command returns an array of elements, or an empty array when key does not exist. If the WITHSCORES modifier is used, the reply is a list elements and their scores from the sorted set.

    Definition Classes
    SortedSets
  187. final def zRange[K](key: K, range: Range)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Return a range of members in a sorted set, by index.

    Return a range of members in a sorted set, by index.

    key

    Key of a sorted set

    range

    Inclusive range

    returns

    Chunk of elements in the specified range.

    Definition Classes
    SortedSets
  188. final def zRangeByLex[K](key: K, lexRange: LexRange, limit: Option[Limit] = None)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Return a range of members in a sorted set, by lexicographical range.

    Return a range of members in a sorted set, by lexicographical range.

    key

    Key of a sorted set

    lexRange

    LexRange that must be satisfied

    limit

    The optional LIMIT argument can be used to only get a range of the matching elements. A negative count returns all elements from the offset

    returns

    Chunk of elements in the specified score range.

    Definition Classes
    SortedSets
  189. final def zRangeByScore[K](key: K, scoreRange: ScoreRange, limit: Option[Limit] = None)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Return a range of members in a sorted set, by score.

    Return a range of members in a sorted set, by score.

    key

    Key of a sorted set

    scoreRange

    ScoreRange that must be satisfied

    limit

    The optional LIMIT argument can be used to only get a range of the matching elements. A negative count returns all elements from the offset

    returns

    Chunk of elements in the specified score range.

    Definition Classes
    SortedSets
  190. final def zRangeByScoreWithScores[K](key: K, scoreRange: ScoreRange, limit: Option[Limit] = None)(implicit arg0: Schema[K]): ResultBuilder1[MemberScores]

    Return a range of members in a sorted set, by score.

    Return a range of members in a sorted set, by score.

    key

    Key of a sorted set

    scoreRange

    ScoreRange that must be satisfied

    limit

    The optional LIMIT argument can be used to only get a range of the matching elements. A negative count returns all elements from the offset

    returns

    Chunk of elements with their scores in the specified score range.

    Definition Classes
    SortedSets
  191. final def zRangeWithScores[K](key: K, range: Range)(implicit arg0: Schema[K]): ResultBuilder1[MemberScores]

    Return a range of members in a sorted set, by index.

    Return a range of members in a sorted set, by index.

    key

    Key of a sorted set

    range

    Inclusive range

    returns

    Chunk of elements with their scores in the specified range.

    Definition Classes
    SortedSets
  192. final def zRank[K, M](key: K, member: M)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Option[Long]]

    Determine the index of a member in a sorted set.

    Determine the index of a member in a sorted set.

    key

    Key of a sorted set

    member

    Member of sorted set

    returns

    The rank of member in the sorted set stored at key, with the scores ordered from low to high.

    Definition Classes
    SortedSets
  193. final def zRem[K, M](key: K, firstMember: M, restMembers: M*)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Long]

    Remove one or more members from a sorted set.

    Remove one or more members from a sorted set.

    key

    Key of a sorted set

    firstMember

    Member to be removed

    restMembers

    Rest members to be removed

    returns

    The number of members removed from the sorted set, not including non existing members.

    Definition Classes
    SortedSets
  194. final def zRemRangeByLex[K](key: K, lexRange: LexRange)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Remove all members in a sorted set between the given lexicographical range.

    Remove all members in a sorted set between the given lexicographical range.

    key

    Key of a sorted set

    lexRange

    LexRange that must be satisfied

    returns

    The number of elements removed.

    Definition Classes
    SortedSets
  195. final def zRemRangeByRank[K](key: K, range: Range)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Remove all members in a sorted set within the given indexes.

    Remove all members in a sorted set within the given indexes.

    key

    Key of a sorted set

    range

    Range that must be satisfied

    returns

    The number of elements removed.

    Definition Classes
    SortedSets
  196. final def zRemRangeByScore[K](key: K, scoreRange: ScoreRange)(implicit arg0: Schema[K]): ZIO[Redis, RedisError, Long]

    Remove all members in a sorted set within the given scores.

    Remove all members in a sorted set within the given scores.

    key

    Key of a sorted set

    scoreRange

    ScoreRange that must be satisfied

    returns

    The number of elements removed.

    Definition Classes
    SortedSets
  197. final def zRevRange[K](key: K, range: Range)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Return a range of members in a sorted set, by index, with scores ordered from high to low.

    Return a range of members in a sorted set, by index, with scores ordered from high to low.

    key

    Key of a sorted set

    range

    Range that must be satisfied

    returns

    Chunk of elements in the specified range.

    Definition Classes
    SortedSets
  198. final def zRevRangeByLex[K](key: K, lexRange: LexRange, limit: Option[Limit] = None)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Return a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings.

    Return a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings.

    key

    Key of a sorted set

    lexRange

    LexRange that must be satisfied

    limit

    The optional LIMIT argument can be used to only get a range of the matching elements. A negative count returns all elements from the offset

    returns

    Chunk of elements in the specified score range.

    Definition Classes
    SortedSets
  199. final def zRevRangeByScore[K](key: K, scoreRange: ScoreRange, limit: Option[Limit] = None)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Return a range of members in a sorted set, by score, with scores ordered from high to low.

    Return a range of members in a sorted set, by score, with scores ordered from high to low.

    key

    Key of a sorted set

    scoreRange

    ScoreRange that must be satisfied

    limit

    The optional LIMIT argument can be used to only get a range of the matching elements. A negative count returns all elements from the offset

    returns

    Chunk of elements in the specified range.

    Definition Classes
    SortedSets
  200. final def zRevRangeByScoreWithScores[K](key: K, scoreRange: ScoreRange, limit: Option[Limit] = None)(implicit arg0: Schema[K]): ResultBuilder1[MemberScores]

    Return a range of members in a sorted set, by score, with scores ordered from high to low.

    Return a range of members in a sorted set, by score, with scores ordered from high to low.

    key

    Key of a sorted set

    scoreRange

    ScoreRange that must be satisfied

    limit

    The optional LIMIT argument can be used to only get a range of the matching elements. A negative count returns all elements from the offset

    returns

    Chunk of elements with their scores in the specified range.

    Definition Classes
    SortedSets
  201. final def zRevRangeWithScores[K](key: K, range: Range)(implicit arg0: Schema[K]): ResultBuilder1[MemberScores]

    Return a range of members in a sorted set, by index, with scores ordered from high to low.

    Return a range of members in a sorted set, by index, with scores ordered from high to low.

    key

    Key of a sorted set

    range

    Range that must be satisfied

    returns

    Chunk of elements with their scores in the specified range.

    Definition Classes
    SortedSets
  202. final def zRevRank[K, M](key: K, member: M)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Option[Long]]

    Determine the index of a member in a sorted set, with scores ordered from high to low.

    Determine the index of a member in a sorted set, with scores ordered from high to low.

    key

    Key of a sorted set

    member

    Member of sorted set

    returns

    The rank of member.

    Definition Classes
    SortedSets
  203. final def zScan[K](key: K, cursor: Long, pattern: Option[String] = None, count: Option[Count] = None)(implicit arg0: Schema[K]): ResultBuilder1[[x](Long, Chunk[MemberScore[x]])]

    Incrementally iterate sorted sets elements and associated scores.

    Incrementally iterate sorted sets elements and associated scores.

    key

    Key of the set to scan

    cursor

    Cursor to use for this iteration of scan

    pattern

    Glob-style pattern that filters which elements are returned

    count

    Count of elements. Roughly this number will be returned by Redis if possible

    returns

    Returns the items for this iteration or nothing when you reach the end.

    Definition Classes
    SortedSets
  204. final def zScore[K, M](key: K, member: M)(implicit arg0: Schema[K], arg1: Schema[M]): ZIO[Redis, RedisError, Option[Double]]

    Get the score associated with the given member in a sorted set.

    Get the score associated with the given member in a sorted set.

    key

    Key of a sorted set

    member

    Member of sorted set

    returns

    The score of member (a double precision floating point number.

    Definition Classes
    SortedSets
  205. final def zUnion[K](inputKeysNum: Long, key: K, keys: K*)(weights: Option[::[Double]] = None, aggregate: Option[Aggregate] = None)(implicit arg0: Schema[K]): ResultBuilder1[Chunk]

    Add multiple sorted sets and return each member.

    Add multiple sorted sets and return each member.

    inputKeysNum

    Number of input keys

    key

    Key of a sorted set

    keys

    Keys of other sorted sets

    weights

    Represents WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set. This means that the score of every element in every input sorted set is multiplied by this factor before being passed to the aggregation function. When WEIGHTS is not given, the multiplication factors default to 1

    aggregate

    With the AGGREGATE option, it is possible to specify how the results of the union are aggregated

    returns

    Chunk of all members in each sorted set.

    Definition Classes
    SortedSets
  206. final def zUnionStore[DK, K](destination: DK, inputKeysNum: Long, key: K, keys: K*)(weights: Option[::[Double]] = None, aggregate: Option[Aggregate] = None)(implicit arg0: Schema[DK], arg1: Schema[K]): ZIO[Redis, RedisError, Long]

    Add multiple sorted sets and store the resulting sorted set in a new key.

    Add multiple sorted sets and store the resulting sorted set in a new key.

    destination

    Key of the output

    inputKeysNum

    Number of input keys

    key

    Key of a sorted set

    keys

    Keys of other sorted sets

    weights

    Represents WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set. This means that the score of every element in every input sorted set is multiplied by this factor before being passed to the aggregation function. When WEIGHTS is not given, the multiplication factors default to 1

    aggregate

    With the AGGREGATE option, it is possible to specify how the results of the union are aggregated

    returns

    The number of elements in the resulting sorted set at destination.

    Definition Classes
    SortedSets
  207. final def zUnionWithScores[K](inputKeysNum: Long, key: K, keys: K*)(weights: Option[::[Double]] = None, aggregate: Option[Aggregate] = None)(implicit arg0: Schema[K]): ResultBuilder1[MemberScores]

    Add multiple sorted sets and return each member and associated score.

    Add multiple sorted sets and return each member and associated score.

    inputKeysNum

    Number of input keys

    key

    Key of a sorted set

    keys

    Keys of other sorted sets

    weights

    Represents WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set. This means that the score of every element in every input sorted set is multiplied by this factor before being passed to the aggregation function. When WEIGHTS is not given, the multiplication factors default to 1

    aggregate

    With the AGGREGATE option, it is possible to specify how the results of the union are aggregated

    returns

    Chunk of all members with their scores in each sorted set.

    Definition Classes
    SortedSets
  208. case object BuildInfo extends Product with Serializable

    This object was generated by sbt-buildinfo.

  209. object Input
  210. object Output
  211. object RedisCommand
  212. object RedisConfig extends Serializable
  213. object RedisError extends Serializable
  214. object RedisExecutor
  215. object RedisLive extends Serializable
  216. object RespValue extends Serializable
  217. object ResultBuilder
  218. object ClientFlag
    Definition Classes
    Connection
  219. object ClientKillFilter
    Definition Classes
    Connection
  220. object ClientPauseMode
    Definition Classes
    Connection
  221. object ClientTrackingMode
    Definition Classes
    Connection
  222. object ClientTrackingRedirect
    Definition Classes
    Connection
  223. object ClientType
    Definition Classes
    Connection
  224. object UnblockBehavior
    Definition Classes
    Connection
  225. object RadiusUnit
    Definition Classes
    Geo
  226. case object WithCoord extends Product with Serializable
    Definition Classes
    Geo
  227. case object WithDist extends Product with Serializable
    Definition Classes
    Geo
  228. case object WithHash extends Product with Serializable
    Definition Classes
    Geo
  229. case object AbsTtl extends Product with Serializable
    Definition Classes
    Keys
  230. case object Alpha extends Product with Serializable
    Definition Classes
    Keys
  231. case object Copy extends Product with Serializable
    Definition Classes
    Keys
  232. object RedisType extends Serializable
    Definition Classes
    Keys
  233. case object Replace extends Product with Serializable
    Definition Classes
    Keys
  234. object Position
    Definition Classes
    Lists
  235. object Side
    Definition Classes
    Lists
  236. object DebugMode
    Definition Classes
    Scripting
  237. object Order
    Definition Classes
    Shared
  238. object Update
    Definition Classes
    Shared
  239. object Aggregate
    Definition Classes
    SortedSets
  240. case object Changed extends Product with Serializable
    Definition Classes
    SortedSets
  241. case object Increment extends Product with Serializable
    Definition Classes
    SortedSets
  242. object LexMaximum
    Definition Classes
    SortedSets
  243. object LexMinimum
    Definition Classes
    SortedSets
  244. object ScoreMaximum
    Definition Classes
    SortedSets
  245. object ScoreMinimum
    Definition Classes
    SortedSets
  246. case object WithScores extends Product with Serializable
    Definition Classes
    SortedSets
  247. case object MkStream extends Product with Serializable
    Definition Classes
    Streams
  248. case object NoAck extends Product with Serializable
    Definition Classes
    Streams
  249. object StreamConsumersInfo extends Serializable
    Definition Classes
    Streams
  250. object StreamGroupsInfo extends Serializable
    Definition Classes
    Streams
  251. object StreamInfo extends Serializable
    Definition Classes
    Streams
  252. object StreamInfoWithFull
    Definition Classes
    Streams
  253. case object WithForce extends Product with Serializable
    Definition Classes
    Streams
  254. case object WithJustId extends Product with Serializable
    Definition Classes
    Streams
  255. object XGroupCommand
    Definition Classes
    Streams
  256. object BitFieldCommand
    Definition Classes
    Strings
  257. object BitFieldType
    Definition Classes
    Strings
  258. object BitOperation
    Definition Classes
    Strings
  259. object Expire
    Definition Classes
    Strings
  260. object ExpiredAt
    Definition Classes
    Strings
  261. case object KeepTtl extends Product with Serializable
    Definition Classes
    Strings
  262. object LcsOutput
    Definition Classes
    Strings
  263. object StrAlgoLcsQueryType
    Definition Classes
    Strings
  264. object StralgoLCS
    Definition Classes
    Strings

Inherited from Scripting

Inherited from Streams

Inherited from Lists

Inherited from Strings

Inherited from SortedSets

Inherited from Shared

Inherited from Keys

Inherited from Geo

Inherited from Connection

Inherited from Scripting

Inherited from Streams

Inherited from SortedSets

Inherited from Strings

Inherited from Sets

Inherited from Lists

Inherited from Keys

Inherited from HyperLogLog

Inherited from Hashes

Inherited from Geo

Inherited from Connection

Inherited from AnyRef

Inherited from Any

Ungrouped