Skip to content

Perform batch get, set, and delete operations against the KV store. All endpoints accept up to 100 keys/items per request and execute atomically inside a single transaction. Use these endpoints when you need to read or write many keys at once and want to avoid the overhead of individual requests.


Retrieve values for multiple keys in a single request (max 100 keys).

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
tablequerystringNoCustom table name. Default: "kv_store"

A request body is required. The schema does not define named properties — pass the data payload expected by the operation (a keys array per the endpoint contract).

{
"keys": ["user:1", "user:2", "user:3"]
}
{
"results": {
"user:1": { "name": "Alice", "email": "alice@example.com" },
"user:2": { "name": "Bob", "email": "bob@example.com" }
},
"found": 2,
"missing": ["user:3"]
}
const result = await client.sqlite.kvStore.batchGet({
db: "/hoody/databases/app.db",
table: "kv_store",
data: {
keys: ["user:1", "user:2", "user:3"]
}
});

Store values for multiple keys in a single transaction (max 100 items).

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
tablequerystringNoCustom table name. Default: "kv_store"

A request body is required. The schema does not define named properties — pass the data payload expected by the operation (an items array per the endpoint contract).

{
"items": [
{ "key": "user:1", "value": { "name": "Alice", "email": "alice@example.com" } },
{ "key": "user:2", "value": { "name": "Bob", "email": "bob@example.com" } }
]
}
{
"success": true,
"stored": 2
}
const result = await client.sqlite.kvStore.batchSet({
db: "/hoody/databases/app.db",
table: "kv_store",
data: {
items: [
{ key: "user:1", value: { name: "Alice", email: "alice@example.com" } },
{ key: "user:2", value: { name: "Bob", email: "bob@example.com" } }
]
}
});

Delete multiple keys in a single transaction (max 100 keys).

NameInTypeRequiredDescription
dbquerystringYesDatabase file path
tablequerystringNoCustom table name. Default: "kv_store"

A request body is required. The schema does not define named properties — pass the data payload expected by the operation (a keys array per the endpoint contract).

{
"keys": ["user:1", "user:2"]
}
{
"success": true,
"deleted": 2
}
const result = await client.sqlite.kvStore.batchDelete({
db: "/hoody/databases/app.db",
table: "kv_store",
data: {
keys: ["user:1", "user:2"]
}
});