Packages

final class StringCommands[K, V] extends AnyRef

Exposes the set of redis string commands available.

Source
StringCommands.scala
Note

Does not support bitfield.

See also

String commands reference.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StringCommands
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. def append(key: K, value: V): Task[Long]

    Append a value to a key.

    Append a value to a key.

    returns

    The length of the string after the append operation. 0 if the key was empty.

    See also

    APPEND.

  2. def bitCount(key: K, start: Long, end: Long): Task[Long]

    Count set bits in a string.

    Count set bits in a string.

    returns

    The number of bits set to 1.

    See also

    BITCOUNT.

  3. def bitCount(key: K): Task[Long]

    Count set bits in a string.

    Count set bits in a string.

    returns

    The number of bits set to 1.

    See also

    BITCOUNT.

  4. def bitOpAnd(destination: K, keys: K*): Task[Long]

    Perform bitwise AND between strings.

    Perform bitwise AND between strings.

    returns

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

    See also

    BITOPAND.

  5. def bitOpNot(destination: K, source: K): Task[Long]

    Perform bitwise NOT between strings.

    Perform bitwise NOT between strings.

    returns

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

    See also

    BITOPNOT.

  6. def bitOpOr(destination: K, keys: K*): Task[Long]

    Perform bitwise OR between strings.

    Perform bitwise OR between strings.

    returns

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

    See also

    BITOPOR.

  7. def bitOpXor(destination: K, keys: K*): Task[Long]

    Perform bitwise XOR between strings.

    Perform bitwise XOR between strings.

    returns

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

    See also

    BITOPXOR.

  8. def bitPosOne(key: K): Task[Option[Long]]

    Find the position of the first bit set in a string.

    Find the position of the first bit set in a string.

    returns

    The command returns the position of the first bit set to 1. None if the key did not exist If the string is empty or composed of just zero bytes, -1 is returned.

  9. def bitPosZero(key: K): Task[Option[Long]]

    Find the position of the first bit clear in a string.

    Find the position of the first bit clear in a string.

    returns

    The command returns the position of the first bit set to 1. If the key did not exist, was empty or composed of just zero bytes, None is returned.

  10. def decr(key: K): Task[Option[Long]]

    Decrement the integer value of a key by one.

    Decrement the integer value of a key by one.

    returns

    The value of key after the decrement

    See also

    DECR.

  11. def decrBy(key: K, amount: Long): Task[Option[Long]]

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

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

    returns

    The value of key after the decrement.

    See also

    DECRBY.

  12. def get(key: K): Task[Option[V]]

    Get the value of a key.

    Get the value of a key.

    returns

    The value of key, or null when key does not exist.

    See also

    GET.

  13. def getBit(key: K, offset: Long): Task[Option[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.

    returns

    The bit value stored at offset.

    See also

    GETBIT.

  14. def getRange(key: K, start: Long, end: Long): Task[Option[V]]

    Get a substring of the string stored at a key.

    Get a substring of the string stored at a key. Fixme: return None on empty strings

    See also

    GETRANGE.

  15. def getSet(key: K, value: V): Task[Option[V]]

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

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

    returns

    The old value stored at key, or null when key did not exist.

    See also

    GETSET.

  16. def incr(key: K): Task[Option[Long]]

    Increment the integer value of a key by one.

    Increment the integer value of a key by one.

    returns

    The value of key after the increment.

    See also

    INCR.

  17. def incrBy(key: K, amount: Long): Task[Option[Long]]

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

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

    returns

    The value of key after the increment.

    See also

    INCRBY.

  18. def incrByFloat(key: K, amount: Double): Task[Option[Double]]

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

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

    returns

    Double bulk string reply the value of key after the increment.

  19. def mGet(keys: List[K]): Observable[(K, Option[V])]

    Get the values of all the given keys.

    Get the values of all the given keys.

    returns

    Values at the specified keys.

    See also

    MGET.

  20. def mGet(keys: K*): Observable[(K, Option[V])]

    Get the values of all the given keys.

    Get the values of all the given keys.

    returns

    Values at the specified keys.

    See also

    MGET.

  21. def mSet(map: Map[K, V]): Task[Unit]

    Set multiple keys to multiple values.

    Set multiple keys to multiple values.

    returns

    Always Unit since MSET can't fail.

    See also

    MSET.

  22. def mSetNx(map: Map[K, V]): Task[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.

    returns

    True if the all the keys were set. False if a key was not set (at least one key already existed).

    See also

    MSETNX.

  23. def set(key: K, value: V): Task[Unit]

    Set the string value of a key.

    Set the string value of a key.

    See also

    SET.

  24. def setBit(key: K, offset: Long, value: Int): Task[Option[Long]]

    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.

    returns

    The original bit value stored at offset.

    See also

    SETBIT.

  25. def setEx(key: K, timeout: FiniteDuration, value: V): Task[Unit]

    Set the value and expiration of a key given a timeout in FiniteDuration (with milliseconds precision).

    Set the value and expiration of a key given a timeout in FiniteDuration (with milliseconds precision).

    See also

    PSETEX.

  26. def setNx(key: K, value: V): Task[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.

    returns

    true if the key was set, otherwise false.

    See also

    SETNX.

  27. def setRange(key: K, offset: Long, value: V): Task[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.

    returns

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

    See also

    SETRANGE.

  28. def strLen(key: K): Task[Long]

    Get the length of the value stored in a key.

    Get the length of the value stored in a key.

    returns

    The length of the string at key, or 0 when key does not exist.

    See also

    STRLEN.