{
  "db_name": "PostgreSQL",
  "query": "\n            SELECT\n                u.id,\n                u.username,\n                u.email,\n                u.display_name,\n                u.avatar_url,\n                u.auth_source,\n                u.created_at,\n                u.updated_at,\n                u.last_login,\n                u.is_admin,\n                u.password_hash,\n                u.external_user_id,\n                u.payment_provider_id,\n                u.is_deleted,\n                u.is_internal,\n                u.batch_notifications_enabled,\n                u.first_batch_email_sent,\n                u.low_balance_notification_sent,\n                u.low_balance_threshold,\n                u.auto_topup_amount,\n                u.auto_topup_threshold,\n                u.auto_topup_monthly_limit,\n                u.auto_topup_limit_notification_sent,\n                u.user_type,\n                ARRAY_AGG(ur.role) FILTER (WHERE ur.role IS NOT NULL) as \"roles: Vec<Role>\"\n            FROM users u\n            LEFT JOIN user_roles ur ON ur.user_id = u.id\n            WHERE u.id = $1 AND u.id != '00000000-0000-0000-0000-000000000000' AND u.is_deleted = false\n            GROUP BY u.id, u.username, u.email, u.display_name, u.avatar_url, u.auth_source, u.created_at, u.updated_at, u.last_login, u.is_admin, u.password_hash, u.external_user_id, u.payment_provider_id, u.is_deleted, u.is_internal, u.batch_notifications_enabled, u.first_batch_email_sent, u.low_balance_notification_sent, u.low_balance_threshold, u.auto_topup_amount, u.auto_topup_threshold, u.auto_topup_monthly_limit, u.auto_topup_limit_notification_sent, u.user_type\n            ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "username",
        "type_info": "Varchar"
      },
      {
        "ordinal": 2,
        "name": "email",
        "type_info": "Varchar"
      },
      {
        "ordinal": 3,
        "name": "display_name",
        "type_info": "Varchar"
      },
      {
        "ordinal": 4,
        "name": "avatar_url",
        "type_info": "Varchar"
      },
      {
        "ordinal": 5,
        "name": "auth_source",
        "type_info": "Varchar"
      },
      {
        "ordinal": 6,
        "name": "created_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 7,
        "name": "updated_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 8,
        "name": "last_login",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 9,
        "name": "is_admin",
        "type_info": "Bool"
      },
      {
        "ordinal": 10,
        "name": "password_hash",
        "type_info": "Text"
      },
      {
        "ordinal": 11,
        "name": "external_user_id",
        "type_info": "Text"
      },
      {
        "ordinal": 12,
        "name": "payment_provider_id",
        "type_info": "Varchar"
      },
      {
        "ordinal": 13,
        "name": "is_deleted",
        "type_info": "Bool"
      },
      {
        "ordinal": 14,
        "name": "is_internal",
        "type_info": "Bool"
      },
      {
        "ordinal": 15,
        "name": "batch_notifications_enabled",
        "type_info": "Bool"
      },
      {
        "ordinal": 16,
        "name": "first_batch_email_sent",
        "type_info": "Bool"
      },
      {
        "ordinal": 17,
        "name": "low_balance_notification_sent",
        "type_info": "Bool"
      },
      {
        "ordinal": 18,
        "name": "low_balance_threshold",
        "type_info": "Float4"
      },
      {
        "ordinal": 19,
        "name": "auto_topup_amount",
        "type_info": "Float4"
      },
      {
        "ordinal": 20,
        "name": "auto_topup_threshold",
        "type_info": "Float4"
      },
      {
        "ordinal": 21,
        "name": "auto_topup_monthly_limit",
        "type_info": "Float4"
      },
      {
        "ordinal": 22,
        "name": "auto_topup_limit_notification_sent",
        "type_info": "Bool"
      },
      {
        "ordinal": 23,
        "name": "user_type",
        "type_info": "Varchar"
      },
      {
        "ordinal": 24,
        "name": "roles: Vec<Role>",
        "type_info": {
          "Custom": {
            "name": "user_role[]",
            "kind": {
              "Array": {
                "Custom": {
                  "name": "user_role",
                  "kind": {
                    "Enum": [
                      "PLATFORMMANAGER",
                      "REQUESTVIEWER",
                      "STANDARDUSER",
                      "BILLINGMANAGER",
                      "BATCHAPIUSER"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    ],
    "parameters": {
      "Left": [
        "Uuid"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      true,
      true,
      false,
      false,
      false,
      true,
      false,
      true,
      true,
      true,
      false,
      false,
      false,
      false,
      false,
      true,
      true,
      true,
      true,
      false,
      false,
      null
    ]
  },
  "hash": "4491e5f80934f469f7b9b1be2d3f7e44e7db9d29792ed9c944551aa62ec5a4eb"
}
