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-5/

{
  "context": "This criteria evaluates the engineer's ability to use GORM's transaction and savepoint features to implement partial rollback logic. The focus is on correct usage of Begin(), SavePoint(), RollbackTo(), Commit(), and Rollback() methods.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Transaction initialization",
      "description": "Uses db.Begin() to start a manual transaction at the beginning of the function",
      "max_score": 15
    },
    {
      "name": "Savepoint creation",
      "description": "Uses tx.SavePoint() with a unique name before attempting to add each line item",
      "max_score": 25
    },
    {
      "name": "Savepoint rollback",
      "description": "Uses tx.RollbackTo() to roll back to the savepoint when item addition fails, allowing the transaction to continue",
      "max_score": 25
    },
    {
      "name": "Transaction commit",
      "description": "Uses tx.Commit() to commit the transaction when at least one item was successfully added",
      "max_score": 15
    },
    {
      "name": "Full rollback",
      "description": "Uses tx.Rollback() to roll back the entire transaction when no items could be added",
      "max_score": 10
    },
    {
      "name": "Error checking",
      "description": "Checks and properly handles errors returned by GORM operations (Create, Update, Find, etc.)",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

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

tile.json