or run

npx @tessl/cli init
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-1/

{
  "context": "This criteria evaluates how well the engineer uses the pg (node-postgres) package to handle automatic type conversion between JavaScript and PostgreSQL. The focus is on proper usage of parameterized queries and understanding how pg handles different JavaScript data types.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Client connection",
      "description": "Uses pg.Client or pg.Pool to establish a connection to PostgreSQL with proper connection parameters",
      "max_score": 10
    },
    {
      "name": "Parameterized queries",
      "description": "Uses parameterized queries with $1, $2, $3, etc. placeholders for value binding rather than string interpolation",
      "max_score": 20
    },
    {
      "name": "String type handling",
      "description": "Correctly passes JavaScript strings to PostgreSQL and retrieves them, relying on pg's automatic type conversion",
      "max_score": 10
    },
    {
      "name": "Number type handling",
      "description": "Correctly passes JavaScript numbers to PostgreSQL and retrieves them, relying on pg's automatic type conversion",
      "max_score": 10
    },
    {
      "name": "Boolean type handling",
      "description": "Correctly passes JavaScript booleans to PostgreSQL and retrieves them, relying on pg's automatic type conversion",
      "max_score": 10
    },
    {
      "name": "Date type handling",
      "description": "Correctly passes JavaScript Date objects to PostgreSQL and retrieves them as Date objects, relying on pg's automatic ISO 8601 conversion",
      "max_score": 15
    },
    {
      "name": "Array type handling",
      "description": "Correctly passes JavaScript arrays to PostgreSQL and retrieves them as arrays, relying on pg's automatic array literal conversion",
      "max_score": 10
    },
    {
      "name": "Null handling",
      "description": "Correctly passes JavaScript null/undefined to PostgreSQL NULL and retrieves null values correctly",
      "max_score": 5
    },
    {
      "name": "Query execution",
      "description": "Uses client.query() method properly with async/await or promises for executing queries and retrieving results",
      "max_score": 5
    },
    {
      "name": "Connection cleanup",
      "description": "Properly closes connections using client.end() or releases pooled connections to prevent resource leaks",
      "max_score": 5
    }
  ]
}