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

{
  "context": "This criteria evaluates how well the engineer uses the pg package's TCP keep-alive configuration feature to establish and maintain a PostgreSQL database connection. The focus is on proper usage of the Client constructor with keep-alive parameters and connection management.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Client instantiation",
      "description": "Creates a pg.Client instance (or uses Client constructor from pg package) with configuration object passed to the constructor",
      "max_score": 20
    },
    {
      "name": "Keep-alive enabled",
      "description": "Sets keepAlive property to true in the client configuration object",
      "max_score": 25
    },
    {
      "name": "Keep-alive delay configured",
      "description": "Sets keepAliveInitialDelayMillis property in the client configuration with the specified millisecond value from the config parameter",
      "max_score": 25
    },
    {
      "name": "Connection parameters",
      "description": "Passes all required connection parameters (host, port, user, password, database) from the config object to the Client constructor",
      "max_score": 15
    },
    {
      "name": "Connection method",
      "description": "Uses the client.connect() method to establish the database connection",
      "max_score": 10
    },
    {
      "name": "Returns client",
      "description": "Returns the configured Client instance from the createClient function so it can be used by calling code",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-pg-native

tile.json