CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/golang-gorm-io--gorm

Full-featured ORM library for Golang with associations, hooks, transactions, migrations, and developer-friendly chainable API

Overall
score

81%

Overview
Eval results
Files

rubric.jsonevals/scenario-10/

{
  "context": "This criteria evaluates how effectively an engineer uses GORM's data scanning and type conversion capabilities to retrieve database records and convert them into various Go data structures (structs, maps, aggregated results).",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses Rows() method",
      "description": "Uses db.Rows() or db.Model().Rows() to obtain *sql.Rows for manual iteration in GetUserRecords implementation",
      "max_score": 15
    },
    {
      "name": "Uses ScanRows()",
      "description": "Correctly uses db.ScanRows(rows, &user) to scan each row into a User struct with automatic type conversion in GetUserRecords",
      "max_score": 20
    },
    {
      "name": "Handles row iteration",
      "description": "Properly iterates through rows using rows.Next() and handles rows.Close() or defers it appropriately",
      "max_score": 10
    },
    {
      "name": "Scans to maps",
      "description": "Uses Scan() or ScanRows() with map[string]interface{} destination type in GetUserMap to retrieve dynamic column-value mappings",
      "max_score": 20
    },
    {
      "name": "Queries aggregated data",
      "description": "Constructs an appropriate GORM query using Select() with COUNT(), SUM(), and AVG() functions for GetAggregatedStats",
      "max_score": 15
    },
    {
      "name": "Scans aggregated results",
      "description": "Uses Scan() or Row().Scan() to convert aggregated query results into the Stats struct fields with proper type handling",
      "max_score": 15
    },
    {
      "name": "Type conversion handling",
      "description": "Demonstrates proper handling of type conversions (uint, int, int64, float64, string) across different scanning scenarios",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/golang-gorm-io--gorm

tile.json