{
  "id": "go/database-sql-query-row-without-scan",
  "signature": "error: sql: expected 0 columns, got 3",
  "signature_zh": "错误：sql：期望0列，得到3列",
  "regex": "error:\\ sql:\\ expected\\ 0\\ columns,\\ got\\ 3",
  "domain": "go",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "Using QueryRow without scanning the result, leaving rows unclosed and causing resource leak.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用QueryRow而不扫描结果，导致行未关闭并造成资源泄漏。",
  "versions": [
    {
      "version": "1.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Calling QueryRow and ignoring result",
      "why_fails": "Rows remain open; always scan or call Close.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Always scan the result of QueryRow",
      "success_rate": 0.98,
      "how": "row := db.QueryRowContext(ctx, \"SELECT name FROM users WHERE id = ?\", id)\nvar name string\nif err := row.Scan(&name); err != nil { return err }",
      "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.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}