{
  "db_name": "PostgreSQL",
  "query": "\n            INSERT INTO customer_profiles (\n                user_id, full_name, phone, city, area, preferred_professions, bio, custom_data, status\n            )\n            VALUES ($1, $2, $3, $4, $5, $6, $7, $8, 'PENDING')\n            ON CONFLICT (user_id) DO UPDATE SET\n                full_name = EXCLUDED.full_name,\n                phone = EXCLUDED.phone,\n                city = EXCLUDED.city,\n                area = EXCLUDED.area,\n                preferred_professions = EXCLUDED.preferred_professions,\n                bio = EXCLUDED.bio,\n                custom_data = EXCLUDED.custom_data,\n                status = CASE\n                    WHEN customer_profiles.status = 'APPROVED' THEN 'APPROVED'\n                    ELSE 'PENDING'\n                END,\n                updated_at = NOW()\n            RETURNING \n                id, user_id, full_name, phone, city, area, preferred_professions, \n                active_requirement_count, status, bio, experience_years, custom_data, \n                created_at, updated_at\n            ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "user_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 2,
        "name": "full_name",
        "type_info": "Varchar"
      },
      {
        "ordinal": 3,
        "name": "phone",
        "type_info": "Varchar"
      },
      {
        "ordinal": 4,
        "name": "city",
        "type_info": "Varchar"
      },
      {
        "ordinal": 5,
        "name": "area",
        "type_info": "Varchar"
      },
      {
        "ordinal": 6,
        "name": "preferred_professions",
        "type_info": "TextArray"
      },
      {
        "ordinal": 7,
        "name": "active_requirement_count",
        "type_info": "Int4"
      },
      {
        "ordinal": 8,
        "name": "status",
        "type_info": "Varchar"
      },
      {
        "ordinal": 9,
        "name": "bio",
        "type_info": "Text"
      },
      {
        "ordinal": 10,
        "name": "experience_years",
        "type_info": "Int4"
      },
      {
        "ordinal": 11,
        "name": "custom_data",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 12,
        "name": "created_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 13,
        "name": "updated_at",
        "type_info": "Timestamptz"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Varchar",
        "Varchar",
        "Varchar",
        "Varchar",
        "TextArray",
        "Text",
        "Jsonb"
      ]
    },
    "nullable": [
      false,
      false,
      true,
      true,
      true,
      true,
      true,
      false,
      false,
      true,
      true,
      true,
      false,
      false
    ]
  },
  "hash": "74ce516d6c76641a431258f36510fc05c2c9cfac68c07eaa66ce612f84223717"
}
