json

batch_delete

Delete multiple JSON documents or paths in one itemwise batch.

db.json.delete_many(entries: 'Any') -> 'BatchResult'

wire json_batch_delete

Deletes multiple document/path entries and returns one positional mutation result per entry. Missing documents and paths are represented as no-op item results; applied items share one engine commit.

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.json.delete_many)

Example

Delete many documents in one commit.

_ = db.json.set_many([{"key": "a", "path": "$", "value": {"v": 1}}])_ = db.json.delete_many([{"key": "a", "path": "$"}])db.json.exists("a")

Parameters

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

Returns

BatchResult<JsonMutationItem>

  • dataBatchResult3
  • typestring

Errors

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

← All 16 JSON commands

agents: this page as markdown → /docs/reference/json/batch_delete.md