Arex.KV (arex v0.1.0)

Copy Markdown View Source

Key/value helpers built on ArcadeDB's Redis-language command support.

Arex.KV wraps the Redis-compatible HTTP command surface that ArcadeDB exposes through /api/v1/command/:db with language: "redis".

Use this module when you want transient Redis-style key/value operations or persistent hash-style commands without constructing raw Redis command strings by hand. Wrapped helpers apply active tenant and scope values as a key namespace. When you need a command that is not wrapped here, use run/2.

The important distinction is between structured helpers and raw commands:

That split keeps the public API predictable without pretending Arex can safely rewrite arbitrary Redis command strings.

Summary

Functions

Executes multiple Redis-language commands as a newline-delimited batch.

Decrements a transient numeric key by 1 with DECR.

Decrements a transient numeric key by the provided amount with DECRBY.

Deletes one or more transient keys with DEL.

Returns whether a transient key exists.

Reads a transient key with GET.

Deletes one or more persistent records or indexed entries with HDEL.

Retrieves a persistent record or indexed value with HGET.

Retrieves multiple persistent records or indexed values with HMGET.

Creates or updates one persistent record payload with HSET.

Increments a transient numeric key by 1 with INCR.

Increments a transient numeric key by the provided amount with INCRBY.

Increments a transient numeric key by a floating-point amount with INCRBYFLOAT.

Sends PING and returns the Redis-compatible response payload.

Executes a raw Redis-language command and returns the normalized command result.

Writes a transient key with SET.

Unwraps the first value field from a normalized Redis-language command result.

Functions

batch(commands, opts \\ [])

Executes multiple Redis-language commands as a newline-delimited batch.

decr(key, opts \\ [])

Decrements a transient numeric key by 1 with DECR.

decrby(key, amount, opts \\ [])

Decrements a transient numeric key by the provided amount with DECRBY.

delete(keys, opts \\ [])

Deletes one or more transient keys with DEL.

exists?(key, opts \\ [])

Returns whether a transient key exists.

get(key, opts \\ [])

Reads a transient key with GET.

hdel(target, keys, opts \\ [])

Deletes one or more persistent records or indexed entries with HDEL.

hget(target, key, opts \\ [])

Retrieves a persistent record or indexed value with HGET.

hmget(target, keys, opts \\ [])

Retrieves multiple persistent records or indexed values with HMGET.

hset(target, payload, opts \\ [])

Creates or updates one persistent record payload with HSET.

incr(key, opts \\ [])

Increments a transient numeric key by 1 with INCR.

incrby(key, amount, opts \\ [])

Increments a transient numeric key by the provided amount with INCRBY.

incrbyfloat(key, amount, opts \\ [])

Increments a transient numeric key by a floating-point amount with INCRBYFLOAT.

ping(opts \\ [])

Sends PING and returns the Redis-compatible response payload.

run(command, opts \\ [])

Executes a raw Redis-language command and returns the normalized command result.

set(key, value, opts \\ [])

Writes a transient key with SET.

value(arg)

Unwraps the first value field from a normalized Redis-language command result.