{
  "db_name": "PostgreSQL",
  "query": "\n            SELECT u.handle, u.email, u.email_verified, u.is_admin, u.deactivated_at, u.takedown_ref,\n                   u.preferred_locale,\n                   u.preferred_comms_channel as \"preferred_comms_channel!: CommsChannel\",\n                   u.discord_verified, u.telegram_verified, u.signal_verified,\n                   u.migrated_to_pds, u.migrated_at,\n                   (SELECT verified FROM user_totp WHERE did = u.did) as totp_enabled,\n                   COALESCE((SELECT (value_json)::boolean FROM account_preferences WHERE user_id = u.id AND name = 'email_auth_factor' ORDER BY created_at DESC LIMIT 1), false) as \"email_2fa_enabled!\"\n            FROM users u\n            WHERE u.did = $1\n            ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "handle",
        "type_info": "Text"
      },
      {
        "ordinal": 1,
        "name": "email",
        "type_info": "Text"
      },
      {
        "ordinal": 2,
        "name": "email_verified",
        "type_info": "Bool"
      },
      {
        "ordinal": 3,
        "name": "is_admin",
        "type_info": "Bool"
      },
      {
        "ordinal": 4,
        "name": "deactivated_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 5,
        "name": "takedown_ref",
        "type_info": "Text"
      },
      {
        "ordinal": 6,
        "name": "preferred_locale",
        "type_info": "Varchar"
      },
      {
        "ordinal": 7,
        "name": "preferred_comms_channel!: CommsChannel",
        "type_info": {
          "Custom": {
            "name": "comms_channel",
            "kind": {
              "Enum": [
                "email",
                "discord",
                "telegram",
                "signal"
              ]
            }
          }
        }
      },
      {
        "ordinal": 8,
        "name": "discord_verified",
        "type_info": "Bool"
      },
      {
        "ordinal": 9,
        "name": "telegram_verified",
        "type_info": "Bool"
      },
      {
        "ordinal": 10,
        "name": "signal_verified",
        "type_info": "Bool"
      },
      {
        "ordinal": 11,
        "name": "migrated_to_pds",
        "type_info": "Text"
      },
      {
        "ordinal": 12,
        "name": "migrated_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 13,
        "name": "totp_enabled",
        "type_info": "Bool"
      },
      {
        "ordinal": 14,
        "name": "email_2fa_enabled!",
        "type_info": "Bool"
      }
    ],
    "parameters": {
      "Left": [
        "Text"
      ]
    },
    "nullable": [
      false,
      true,
      false,
      false,
      true,
      true,
      true,
      false,
      false,
      false,
      false,
      true,
      true,
      null,
      null
    ]
  },
  "hash": "c8728a1247c535e941e2b3bcb4100d7b3610f31c7acfdc1f8c072e1c5ca0ea18"
}
