Strings

Strings are the simplest values: text, numbers or bytes under one key. Get and set them, count with them, append to them, and set several at once.

26 commands in KiviDB 1.1.2. Every command.

  • APPEND: Appends value to the string at key.
  • DECR: Subtracts 1 from the integer stored at key.
  • DECRBY: Subtracts decrement, a signed 64-bit integer, from the integer stored at key.
  • DELEX: Deletes key, optionally only if its string value, or the value's digest, matches.
  • DIGEST: Returns a digest of the string at key: the XXH3 64-bit hash of the value, as 16 hexadecimal digits.
  • GET: Returns the string stored at key.
  • GETDEL: Returns the string at key and deletes the key, in one step.
  • GETEX: Returns the string at key and, optionally, changes its expiry.
  • GETRANGE: Returns the bytes of the string at key from offset start to offset end, both included.
  • GETSET: Sets key to value and returns the value it held before, in one step.
  • INCR: Adds 1 to the integer stored at key.
  • INCRBY: Adds increment, a signed 64-bit integer, to the integer stored at key.
  • INCRBYFLOAT: Adds increment, a floating-point number, to the number stored at key.
  • INCREX: Increments the number at key with bounds, and optionally sets its expiry, in one step.
  • LCS: Finds the longest common subsequence of the strings at key1 and key2: the longest run of characters found in both, in the same order, not necessarily next to each other.
  • MGET: Returns the values of several keys.
  • MSET: Sets several keys to string values in one step.
  • MSETEX: Sets several keys in one step, with one expiry for all of them, and optionally only if they all exist or none does.
  • MSETNX: Sets several keys to string values only if none of them exists.
  • PSETEX: Sets key to value and makes it expire after milliseconds.
  • SET: Stores a string at key, replacing whatever the key held, of any type.
  • SETEX: Sets key to value and makes it expire after seconds.
  • SETNX: Sets key to value only if the key does not exist.
  • SETRANGE: Overwrites the string at key from byte offset on with value.
  • STRLEN: Returns the length, in bytes, of the string at key.
  • SUBSTR: Another name for GETRANGE, kept for old clients.