{
  "db_name": "PostgreSQL",
  "query": "\n            WITH updated AS (\n                UPDATE deployed_model_components\n                SET weight = COALESCE($3, weight),\n                    enabled = COALESCE($4, enabled),\n                    sort_order = COALESCE($5, sort_order)\n                WHERE composite_model_id = $1 AND deployed_model_id = $2\n                RETURNING id, composite_model_id, deployed_model_id, weight, enabled, sort_order, created_at\n            )\n            SELECT\n                updated.id,\n                updated.composite_model_id,\n                updated.deployed_model_id,\n                updated.weight,\n                updated.enabled,\n                updated.sort_order,\n                updated.created_at,\n                dm.alias as model_alias,\n                dm.model_name,\n                dm.description as model_description,\n                dm.type as model_type,\n                dm.trusted as model_trusted,\n                dm.open_responses_adapter as \"model_open_responses_adapter?\",\n                dm.hosted_on as endpoint_id,\n                e.name as \"endpoint_name?\"\n            FROM updated\n            JOIN deployed_models dm ON dm.id = updated.deployed_model_id\n            LEFT JOIN inference_endpoints e ON e.id = dm.hosted_on\n            ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "composite_model_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 2,
        "name": "deployed_model_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 3,
        "name": "weight",
        "type_info": "Int4"
      },
      {
        "ordinal": 4,
        "name": "enabled",
        "type_info": "Bool"
      },
      {
        "ordinal": 5,
        "name": "sort_order",
        "type_info": "Int4"
      },
      {
        "ordinal": 6,
        "name": "created_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 7,
        "name": "model_alias",
        "type_info": "Varchar"
      },
      {
        "ordinal": 8,
        "name": "model_name",
        "type_info": "Varchar"
      },
      {
        "ordinal": 9,
        "name": "model_description",
        "type_info": "Text"
      },
      {
        "ordinal": 10,
        "name": "model_type",
        "type_info": "Varchar"
      },
      {
        "ordinal": 11,
        "name": "model_trusted",
        "type_info": "Bool"
      },
      {
        "ordinal": 12,
        "name": "model_open_responses_adapter?",
        "type_info": "Bool"
      },
      {
        "ordinal": 13,
        "name": "endpoint_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 14,
        "name": "endpoint_name?",
        "type_info": "Varchar"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Uuid",
        "Int4",
        "Bool",
        "Int4"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      false,
      false,
      false,
      false,
      false,
      true,
      true,
      false,
      true,
      true,
      true
    ]
  },
  "hash": "382629e6fc03aa405f57a10fe159880d18b107a65c0319a7c71866bac43b4360"
}
