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

{
  "context": "This criteria evaluates how well the engineer uses the pg package's connection timeout configuration features to implement a database connection manager. The focus is on proper usage of the connectionTimeoutMillis parameter with both Client and Pool instances.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import pg package",
      "description": "Correctly imports the pg package or its components (Client and/or Pool classes)",
      "max_score": 10
    },
    {
      "name": "Client instantiation",
      "description": "Creates a Client instance using the pg.Client constructor or imported Client class in the createClient function",
      "max_score": 15
    },
    {
      "name": "Client timeout config",
      "description": "Passes the connectionTimeoutMillis parameter in the configuration object when creating a Client instance",
      "max_score": 20
    },
    {
      "name": "Client config passing",
      "description": "Correctly passes all connection parameters (host, port, database, user, password, connectionTimeoutMillis) from the function parameter to the Client constructor",
      "max_score": 15
    },
    {
      "name": "Pool instantiation",
      "description": "Creates a Pool instance using the pg.Pool constructor or imported Pool class in the createPool function",
      "max_score": 15
    },
    {
      "name": "Pool timeout config",
      "description": "Passes the connectionTimeoutMillis parameter in the configuration object when creating a Pool instance",
      "max_score": 20
    },
    {
      "name": "Pool config passing",
      "description": "Correctly passes all connection and pool parameters (host, port, database, user, password, connectionTimeoutMillis, max) from the function parameter to the Pool constructor",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-pg-native

tile.json