kv

batch_exists

Check existence for multiple KV keys.

db.kv.exists_many(keys: 'Sequence[str | bytes]') -> 'list[bool]'

wire kv_batch_exists

Checks several KV keys and returns positional boolean status values. The response preserves the input order.

Itemwise batches return one positional item result per input item. The outer batch status summarizes whether all, some, or none of the items succeeded.

To see the complete help for this command, run:

help(db.kv.exists_many)

Example

Check existence for many keys at once.

_ = db.kv.put_many([{"key": "a", "value": "1"}])db.kv.exists_many(["a", "missing"])

Parameters

NameTypeRequiredDescription
keysarrayyesKeys to check.
branchstring or nullnoTarget branch. Defaults to the executor handle branch.
spacestring or nullnoTarget product space. Defaults to `"default"`.

Returns

BatchResult<BatchExistsItemResult>

  • dataBatchResult5
  • typestring

Errors

Recover by code. Retry policy and commit outcome come from the shipped error registry.

← All 13 Key-value commands

agents: this page as markdown → /docs/reference/kv/batch_exists.md