{
  "db_name": "PostgreSQL",
  "query": "UPDATE v2_job_status SET flow_status = \n                                 CASE \n                                 WHEN flow_status->'modules'->$1::int->'flow_jobs_duration' IS NOT NULL THEN\n                                    JSONB_SET(\n                                         JSONB_SET(JSONB_SET(JSONB_SET(\n                                            flow_status, \n                                            ARRAY['modules', $1::TEXT, 'flow_jobs_success', $3::TEXT], $4), \n                                            ARRAY['modules', $1::TEXT, 'flow_jobs_duration', 'started_at', $3::TEXT], $5), \n                                            ARRAY['modules', $1::TEXT, 'flow_jobs_duration', 'duration_ms', $3::TEXT], $6),\n                                            ARRAY['modules', $1::TEXT, 'branchall', 'branch'],\n                                            ((flow_status->'modules'->$1::int->'branchall'->>'branch')::int + 1)::text::jsonb\n                                     )\n                                 ELSE\n                                    JSONB_SET(JSONB_SET(\n                                    flow_status, ARRAY['modules', $1::TEXT, 'flow_jobs_success', $3::TEXT], $4),\n                                         ARRAY['modules', $1::TEXT, 'branchall', 'branch'],\n                                         ((flow_status->'modules'->$1::int->'branchall'->>'branch')::int + 1)::text::jsonb\n                                     )\n                                 END\n                                 WHERE id = $2\n                                 RETURNING (flow_status->'modules'->$1::int->'branchall'->>'branch')::int",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "int4",
        "type_info": "Int4"
      }
    ],
    "parameters": {
      "Left": [
        "Int4",
        "Uuid",
        "Text",
        "Jsonb",
        "Jsonb",
        "Jsonb"
      ]
    },
    "nullable": [
      null
    ]
  },
  "hash": "93f00e2d164c090a959da12cbb7e4fc6e5804fea077116d339a041c0f2b0c1fa"
}
