mutation_dry_run
Dry-run INSERT, UPDATE, or DELETE inside a transaction, capture real results (row counts, errors, before/after data), then roll back to verify mutations safely.
Instructions
Execute INSERT/UPDATE/DELETE in dry-run mode - actually runs the SQL within a transaction, captures REAL results (exact row counts, actual errors, before/after data), then ROLLBACK so nothing persists. More accurate than mutation_preview. Use this to verify mutations will work correctly before committing. Returns detailed PostgreSQL error info (code, constraint, hint) on failure. Optionally use server/database/schema params for one-time execution on a different server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The INSERT, UPDATE, or DELETE statement to dry-run | |
| sampleSize | No | Number of sample rows to return (default: 10, max: 20) | |
| server | No | One-time server override. Execute on this server without changing main connection. | |
| database | No | One-time database override. Uses this database for execution. | |
| schema | No | One-time schema override. Sets search_path for this execution only. |