CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-pg-native

A slightly nicer interface to Postgres over node-libpq providing both sync and async operations

88

1.20x

Quality

Pending

Does it follow best practices?

Impact

88%

1.20x

Average score across 10 eval scenarios

Overview
Eval results
Files

rubric.jsonevals/scenario-9/

{
  "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
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-pg-native

tile.json