SurrealDB icon

SurrealDB

Interaction with a SurrealDB database

Batch → Batch Delete

AI-generated

Summary

Delete multiple records in a specified SurrealDB table by providing a comma-separated list of record IDs. Supports batch processing with configurable batch size, parallel execution, error handling policies, and transaction mode.

Inputs

  • Table (required) — The SurrealDB table name from which records will be deleted (e.g., "person", "product").
  • Record IDs (required) — Comma-separated list of record IDs to delete. IDs may include a table prefix (e.g., "person:john") or just the record ID (e.g., "john").
  • Batch Configuration — Settings for batch processing such as batch size, parallel processing, max parallel batches, error handling behavior (stop, continue, partial success), transaction mode to execute all deletes within a single transaction, and progress tracking.
  • Options — Optional namespace and database to override credential defaults for this operation.
  • Connection Pooling — Settings to control connection pool behavior like max/min connections, acquire timeout, health check interval, max idle time, retry attempts/delay, and connection validation options.

Output shape

a list of batch operation results, each indicating success or failure with associated data or error details

The output includes results per batch processed. Error handling configuration affects whether processing stops on first error, continues with all errors collected, or returns partial successes. Progress tracking can be enabled to report the operation's progress.

Examples

Example 1: Use this operation to delete multiple records efficiently from a specific table in SurrealDB by specifying their IDs, optionally processing in parallel and handling errors according to workflow needs.

Specify the target Table, provide a comma-separated string of Record IDs, and configure batch processing options like batch size and error handling to control execution behavior.

Links

Discussion