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

81

1.12x
Quality

Pending

Does it follow best practices?

Impact

81%

1.12x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

criteria.jsonevals/scenario-7/

{
  "context": "This evaluation assesses the engineer's ability to implement and use GORM's BelongsTo relationship functionality, including proper model setup, foreign key handling, association preloading, and querying through relationships.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "BelongsTo Relationship Setup",
      "description": "Book model correctly defines the BelongsTo relationship with Author by including both AuthorID (foreign key field) and Author (association field) fields with appropriate types (uint for ID, Author struct for association).",
      "max_score": 25
    },
    {
      "name": "Database Connection Initialization",
      "description": "Uses gorm.Open() with appropriate SQLite driver to establish database connection, and calls AutoMigrate() on both Author and Book models to create the schema.",
      "max_score": 15
    },
    {
      "name": "Association Preloading",
      "description": "Uses the Preload() method to eagerly load the Author association when querying for a Book, preventing N+1 query problems and ensuring the Author field is populated.",
      "max_score": 25
    },
    {
      "name": "Querying Through Relationships",
      "description": "Uses Where() or Joins() clause with foreign key conditions (e.g., AuthorID) to query books belonging to a specific author, demonstrating understanding of how BelongsTo relationships work at the database level.",
      "max_score": 20
    },
    {
      "name": "CRUD Operations",
      "description": "Uses Create() method to insert Author and Book records with proper foreign key association, and uses Save() or Updates() method to modify existing records.",
      "max_score": 15
    }
  ]
}

tile.json