{"library":"co-pg","type":"library","category":null,"description":"A wrapper for node-postgres (pg) that provides promise-based methods (e.g., connectPromise, queryPromise) compatible with the co generator-based control flow library and async/await. Current version 2.0.2, last updated in 2022. It allows using PostgreSQL connections and queries with yield or await instead of callbacks, without altering the original pg API. Supports pg, pg-native, and pg-pure backends. The library is in maintenance mode; newer projects should prefer native async/await with pg directly.","language":"javascript","status":"maintenance","version":"2.0.2","tags":["javascript","async","generator","coroutine","co","postgresql","postgres","pg"],"last_verified":"Fri Jun 05","install":[{"cmd":"npm install co-pg","imports":["const pg = require('co-pg')(require('pg'));","const client = new pg.Client(connectionString); yield client.connectPromise();","yield client.queryPromise('SELECT NOW()');"]},{"cmd":"yarn add co-pg","imports":[]},{"cmd":"pnpm add co-pg","imports":[]}],"homepage":"https://github.com/basicdays/co-pg","github":"https://github.com/basicdays/co-pg","docs":null,"changelog":null,"pypi":null,"npm":"co-pg","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}