{
  "db_name": "PostgreSQL",
  "query": "\n            UPDATE batches\n            SET deleted_at = NOW(),\n                cancelling_at = CASE\n                    WHEN completed_at IS NULL AND failed_at IS NULL AND cancelled_at IS NULL\n                        THEN COALESCE(cancelling_at, NOW())\n                    ELSE cancelling_at\n                END,\n                cancelled_at = CASE\n                    WHEN completed_at IS NULL AND failed_at IS NULL AND cancelled_at IS NULL\n                        THEN COALESCE(cancelled_at, NOW())\n                    ELSE cancelled_at\n                END\n            WHERE id = $1\n              AND deleted_at IS NULL\n            ",
  "describe": {
    "columns": [],
    "parameters": {
      "Left": [
        "Uuid"
      ]
    },
    "nullable": []
  },
  "hash": "0b6a2c8a106eb81d8902e169ef7d97a7ed841ab64405c400b1a1f6026f239197"
}
