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

{
  "context": "This evaluation assesses how effectively the engineer uses pg-native's query execution capabilities, specifically the three asynchronous patterns: callback-based query(), promise-based query(), and async/await patterns. The focus is on proper use of pg-native's API methods and correct handling of query results and errors.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Callback query() usage",
      "description": "Uses pg-native client's query() method with callback parameter for callback-based execution. The callback should follow Node.js error-first convention (callback(err, result)).",
      "max_score": 25
    },
    {
      "name": "Promise query() usage",
      "description": "Uses pg-native client's query() method without callback parameter to return a Promise, properly handling resolution with .then() or returning the Promise directly.",
      "max_score": 25
    },
    {
      "name": "Async query() usage",
      "description": "Uses pg-native client's query() method with await keyword inside an async function, properly handling the returned Promise through async/await syntax.",
      "max_score": 25
    },
    {
      "name": "Parameterized queries",
      "description": "Correctly passes parameterized queries with values array to query() method, supporting both callback and promise patterns with parameters.",
      "max_score": 15
    },
    {
      "name": "Error handling",
      "description": "Properly handles query errors in all three patterns: error parameter in callbacks, Promise rejection/catch for promises, and try/catch for async/await.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-pg-native

tile.json