or run

npx @tessl/cli init
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-5/

{
  "context": "This evaluation assesses how effectively the engineer uses pg-native's query execution capabilities, specifically the three asynchronous patterns: callback-based query(), promise-based query(), and async/await patterns. The focus is on proper use of pg-native's API methods and correct handling of query results and errors.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Callback query() usage",
      "description": "Uses pg-native client's query() method with callback parameter for callback-based execution. The callback should follow Node.js error-first convention (callback(err, result)).",
      "max_score": 25
    },
    {
      "name": "Promise query() usage",
      "description": "Uses pg-native client's query() method without callback parameter to return a Promise, properly handling resolution with .then() or returning the Promise directly.",
      "max_score": 25
    },
    {
      "name": "Async query() usage",
      "description": "Uses pg-native client's query() method with await keyword inside an async function, properly handling the returned Promise through async/await syntax.",
      "max_score": 25
    },
    {
      "name": "Parameterized queries",
      "description": "Correctly passes parameterized queries with values array to query() method, supporting both callback and promise patterns with parameters.",
      "max_score": 15
    },
    {
      "name": "Error handling",
      "description": "Properly handles query errors in all three patterns: error parameter in callbacks, Promise rejection/catch for promises, and try/catch for async/await.",
      "max_score": 10
    }
  ]
}