or run

npx @tessl/cli init
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates how well the engineer uses pg-native's parameterized query capability with positional parameters to safely query a PostgreSQL database. The focus is on proper usage of $1, $2, $3 style parameters and the client.query() method with parameter arrays.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Positional parameters syntax",
      "description": "Uses PostgreSQL positional parameter syntax ($1, $2, $3, etc.) in SQL query strings instead of string concatenation or interpolation",
      "max_score": 25
    },
    {
      "name": "Parameter array usage",
      "description": "Passes parameter values as an array in the second argument to client.query() or client.querySync() methods",
      "max_score": 25
    },
    {
      "name": "getUserById implementation",
      "description": "Implements getUserById using client.query() with a single positional parameter ($1) for the user ID",
      "max_score": 15
    },
    {
      "name": "getUserByEmail implementation",
      "description": "Implements getUserByEmail using client.query() with a single positional parameter ($1) for the email address",
      "max_score": 15
    },
    {
      "name": "getUsersByAgeRange implementation",
      "description": "Implements getUsersByAgeRange using client.query() with two positional parameters ($1 and $2) for minAge and maxAge",
      "max_score": 20
    }
  ]
}