HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Modulehedis-0.16.4Haskell2010

Database.Redis.ManualCommands.JSON

  • 5 types
  • 45 values
  • Packagehedis-0.16.4
  • Exports50
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceJSON.hs
valuejsonArrappend
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> ByteString

    Path to the array.

  4. -> NonEmpty ByteString

    Serialized JSON values to append.

  5. -> m (f Reply)
#

Appends one or more JSON values into the array at path after the last element in it (https://redis.io/commands/json.arrappend).

The reply shape depends on the path syntax, so this wrapper returns the raw Reply.

O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

valuejsonArrindex
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> ByteString

    Path to the array.

  4. -> ByteString

    Serialized JSON scalar to search for.

  5. -> m (f Reply)
#

Returns the index of the first occurrence of a JSON scalar value in the array at path (https://redis.io/commands/json.arrindex).

The reply shape depends on the path syntax, so this wrapper returns the raw Reply.

O(N) when path is evaluated to a single value where N is the size of the array, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

valuejsonArrindexOpts
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> ByteString

    Path to the array.

  4. -> ByteString

    Serialized JSON scalar to search for.

  5. -> JSONArrIndexOpts

    Optional search range.

  6. -> m (f Reply)
#

Returns the index of the first occurrence of a JSON scalar value in the array at path (https://redis.io/commands/json.arrindex).

The reply shape depends on the path syntax, so this wrapper returns the raw Reply.

O(N) when path is evaluated to a single value where N is the size of the array, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

valuejsonArrinsert
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> ByteString

    Path to the array.

  4. -> Integer

    Insertion index.

  5. -> NonEmpty ByteString

    Serialized JSON values to insert.

  6. -> m (f Reply)
#

Inserts the JSON scalar(s) value at the specified index in the array at path (https://redis.io/commands/json.arrinsert).

The reply shape depends on the path syntax, so this wrapper returns the raw Reply.

O(N) when path is evaluated to a single value where N is the size of the array, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

valuejsonArrpopAt
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> ByteString

    Path to the array.

  4. -> m (f Reply)
#

Removes and returns the element at the end of the array at path (https://redis.io/commands/json.arrpop).

The reply shape depends on the path syntax and popped value type, so this wrapper returns the raw Reply.

O(1) when the popped item is the last element, otherwise O(N) where N is the size of the array

Since RedisJSON 1.0.0

valuejsonArrtrim
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> ByteString

    Path to the array.

  4. -> Integer

    Start index.

  5. -> Integer

    Stop index.

  6. -> m (f Reply)
#

Trims the array at path to contain only the specified inclusive range of indices from start to stop (https://redis.io/commands/json.arrtrim).

The reply shape depends on the path syntax, so this wrapper returns the raw Reply.

O(N) when path is evaluated to a single value where N is the size of the array, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

valuejsonClear
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> m (f Integer)
#

Clears all values from an array or an object and sets numeric values at the root path to 0 (https://redis.io/commands/json.clear).

O(N) when path is evaluated to a single value where N is the size of the values, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 2.0.0

valuejsonClearAt
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> ByteString

    Path to clear.

  4. -> m (f Integer)
#

Clears all values from an array or an object and sets numeric values at path to 0 (https://redis.io/commands/json.clear).

O(N) when path is evaluated to a single value where N is the size of the values, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 2.0.0

valuejsonDebugMemory
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> m (f Reply)
#

Reports the size in bytes of a key at the root path (https://redis.io/commands/json.debug-memory).

The reply shape depends on the path syntax, so this wrapper returns the raw Reply.

O(N) when path is evaluated to a single value, where N is the size of the value, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

valuejsonDel
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> m (f Integer)
#

Deletes a value at the root path (https://redis.io/commands/json.del).

O(N) when path is evaluated to a single value where N is the size of the deleted value, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

valuejsonMerge
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> ByteString

    Path to merge into.

  4. -> ByteString

    Serialized JSON value.

  5. -> m (f Status)
#

Merges a given JSON value into matching paths (https://redis.io/commands/json.merge).

Consequently, JSON values at matching paths are updated, deleted, or expanded with new children.

O(M+N) when path is evaluated to a single value where M is the size of the original value and N is the size of the new value, O(M+N) when path is evaluated to multiple values where M is the size of the key and N is the size of the new value times the number of matches

Since RedisJSON 2.6.0

valuejsonObjkeys
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> m (f Reply)
#

Returns the key names of JSON objects at the root path (https://redis.io/commands/json.objkeys).

The reply shape depends on the path syntax, so this wrapper returns the raw Reply.

O(N) when path is evaluated to a single value, where N is the number of keys in the object, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

valuejsonObjkeysAt
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> ByteString

    Path to the object.

  4. -> m (f Reply)
#

Returns the key names of JSON objects at path (https://redis.io/commands/json.objkeys).

The reply shape depends on the path syntax, so this wrapper returns the raw Reply.

O(N) when path is evaluated to a single value, where N is the number of keys in the object, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

valuejsonObjlen
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> m (f Reply)
#

Returns the number of keys in JSON objects at the root path (https://redis.io/commands/json.objlen).

The reply shape depends on the path syntax, so this wrapper returns the raw Reply.

O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

valuejsonObjlenAt
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> ByteString

    Path to the object.

  4. -> m (f Reply)
#

Returns the number of keys in JSON objects at path (https://redis.io/commands/json.objlen).

The reply shape depends on the path syntax, so this wrapper returns the raw Reply.

O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

valuejsonResp
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> m (f Reply)
#

Returns the JSON value at the root path in Redis Serialization Protocol (RESP) (https://redis.io/commands/json.resp).

The reply may be any RESP shape depending on the JSON value, so this wrapper returns the raw Reply.

O(N) when path is evaluated to a single value, where N is the size of the value, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

valuejsonRespAt
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> ByteString

    Path to inspect.

  4. -> m (f Reply)
#

Returns the JSON value at path in Redis Serialization Protocol (RESP) (https://redis.io/commands/json.resp).

The reply may be any RESP shape depending on the JSON value, so this wrapper returns the raw Reply.

O(N) when path is evaluated to a single value, where N is the size of the value, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

when path is evaluated to a single value where $M$ is the size of the original value and $N$ is the size of the new value, $O(M+N)$ when path is evaluated to multiple values where $M$ is the size of the key and $N$ is the size of the new value times the number of matches

Since RedisJSON 1.0.0

valuejsonSetOpts
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> ByteString

    Path to set.

  4. -> ByteString

    Serialized JSON value.

  5. -> JSONSetOpts

    Conditional and FPHA options.

  6. -> m (f (Maybe Status))
#

Sets or updates the JSON value at a path (https://redis.io/commands/json.set).

O(M+N) when path is evaluated to a single value where M is the size of the original value and N is the size of the new value, O(M+N) when path is evaluated to multiple values where M is the size of the key and N is the size of the new value times the number of matches

Since RedisJSON 1.0.0

valuejsonType
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> m (f Reply)
#

Returns the type of the JSON value at the root path (https://redis.io/commands/json.type).

The reply shape depends on the path syntax, so this wrapper returns the raw Reply.

O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0

valuejsonTypeAt
  1. :: RedisCtx m f
  2. => ByteString

    Key holding a JSON value.

  3. -> ByteString

    Path to inspect.

  4. -> m (f Reply)
#

Returns the type of the JSON value at path (https://redis.io/commands/json.type).

The reply shape depends on the path syntax, so this wrapper returns the raw Reply.

O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key

Since RedisJSON 1.0.0