{
  "id": "go/database-sql-scan-type-error",
  "signature": "sql: Scan error on column index 1: converting driver.Value type []uint8 to int64: invalid conversion",
  "signature_zh": "sql: 列索引 1 扫描错误：将 driver.Value 类型 []uint8 转换为 int64：无效转换",
  "regex": "sql:\\ Scan\\ error\\ on\\ column\\ index\\ 1:\\ converting\\ driver\\.Value\\ type\\ \\[\\]uint8\\ to\\ int64:\\ invalid\\ conversion",
  "domain": "go",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "Scanning a database value into a Go variable of incompatible type, e.g., a string column into an integer.",
  "root_cause_type": "generic",
  "root_cause_zh": "将数据库值扫描到不兼容类型的 Go 变量中，例如将字符串列扫描为整数。",
  "versions": [
    {
      "version": "1.22",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Fails at runtime if the value is not a string or []byte.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Leads to incorrect data handling and silent bugs.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.85,
      "how": "var id int64; if err := rows.Scan(&id); err != nil { /* handle type mismatch */ }; // or scan into sql.NullString and convert",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-09-14",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}