Optionalguard: OperationGuardCreates the index for the JSON Documents in Redis.
a promise that resolves when the index has been created successfully
Drops the index for the JSON Documents in Redis.
Optionaloptions: FtDropIndexOptions
optional FT.DROPINDEX command options
the number of indexes that were dropped
Sets the expiration time for a given JSON Document in Redis.
the id of the JSON Document to set expiration on
Number of seconds until key expiration
Optionalmode: "NX" | "XX" | "GT" | "LT"
Expiration mode: NX (only if key has no expiry), XX (only if key has existing expiry), GT (only if new expiry is greater than current), LT (only if new expiry is less than current)
Fetches a JSON Document, or part of it, from Redis by its id.
The shape of the result depends on options.path:
.: the whole JSON Document, validated against the schema.$: the whole JSON Document wrapped in an array (RedisJSON 2.x JSONPath reply).
The document is validated against the schema.$): an array of the matches, exactly as returned
by Redis (empty if nothing matches). It is not validated..artist or artist): the value at that path, as returned
by Redis. It is not validated.the id of the JSON Document to fetch
Optionaloptions: JsonGetOptions & { path?: P }
optional JSON.GET command options
the result described above, or null if the JSON Document does not exist
Computes the full Redis key for a JSON Document based on its id.
the id of the JSON Document
the full Redis key for the JSON Document
information about the index if it exists, or null if the index does not exist
Removes a JSON Document from Redis.
the id of the JSON Document to remove
Optionaloptions: JsonDelOptions
optional JSON.DEL command options
the number of keys that were removed
Saves a JSON Document to Redis.
the id of the JSON Document to save
the JSON Document to save
Optionaloptions: JsonSetOptions
optional JSON.SET command options
the result of the Redis JSON.SET command
Searches for JSON Documents in Redis using the specified query and options.
the search query to execute
Optionaloptions: FtSearchOptions
optional search options
the result of the Redis FT.SEARCH command
Sets the whole JSON Document (root path $), like Repository.save.
The value is validated against the schema before being written.
the id of the JSON Document to set
the JSON Document to set
Optionaloptions: JsonSetOptions
optional JSON.SET command options
the result of the Redis JSON.SET command
Sets the value at a given path of a JSON Document.
Validation against the schema is only performed when path is the root ($);
values written to any other path are sent to Redis as is.
the id of the JSON Document to modify
the JSONPath where to set the value
the value to set at path
Optionaloptions: JsonSetOptions
optional JSON.SET command options
the result of the Redis JSON.SET command
Represents a repository for JSON Documents stored in Redis. Provides methods to save, fetch, and remove JSON Documents, as well as create the index.