{
  "db_name": "PostgreSQL",
  "query": "\n        UPDATE support_tickets SET\n            status      = COALESCE($2, status),\n            priority    = COALESCE($3, priority),\n            assigned_to = COALESCE($4, assigned_to),\n            resolved_at = CASE WHEN $2 = 'resolved' AND resolved_at IS NULL THEN NOW() ELSE resolved_at END,\n            updated_at  = NOW()\n        WHERE id = $1\n        RETURNING id, subject, category, priority, status,\n                  requester_name, requester_email, assigned_to, created_at, updated_at\n        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "subject",
        "type_info": "Varchar"
      },
      {
        "ordinal": 2,
        "name": "category",
        "type_info": "Varchar"
      },
      {
        "ordinal": 3,
        "name": "priority",
        "type_info": "Varchar"
      },
      {
        "ordinal": 4,
        "name": "status",
        "type_info": "Varchar"
      },
      {
        "ordinal": 5,
        "name": "requester_name",
        "type_info": "Varchar"
      },
      {
        "ordinal": 6,
        "name": "requester_email",
        "type_info": "Varchar"
      },
      {
        "ordinal": 7,
        "name": "assigned_to",
        "type_info": "Uuid"
      },
      {
        "ordinal": 8,
        "name": "created_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 9,
        "name": "updated_at",
        "type_info": "Timestamptz"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Varchar",
        "Varchar",
        "Uuid"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      false,
      true,
      true,
      true,
      false,
      false
    ]
  },
  "hash": "9558a787b8490b54da6045821793c180a128dee97be81e7bcc37f8ab0059d0f8"
}
