Chaingres is a query builder for PostgreSQL that uses a cascading (chained) style programming API. Version 0.2.0 is the latest stable release, but the project appears to be in early development with minimal updates. It wraps the 'pg' Node.js driver. Key differentiator: chainable methods for constructing INSERT and SELECT queries, similar to jQuery-style chaining. However, it lacks TypeScript support, modern ESM exports, and comprehensive documentation. Alternatives like Knex.js or Slonik offer more features, maturity, and active maintenance.
npm install chaingresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to a PostgreSQL database using 'pg' client and performs an INSERT query using the Chaingres chainable API without Promises.
Use the provided .then() with two arguments, or wrap in a Promise manually if needed.
Consider using a more mature query builder like Knex.js for production use.
Always pass a connected 'pg.Client' instance to .new().
Use const chaingres = require('chaingres'); and then chaingres.new(client) correctly.Ensure you call .new(client) with a valid pg.Client instance before chaining other methods.
Use CommonJS require: const chaingres = require('chaingres');