Wednesday, February 08, 2023

pg-promise for node.js

simpler (and faster?) access to database, instead ORMs like TypeORM or Sequelize, or just pg driver

vitaly-t/pg-promise: PostgreSQL interface for Node.js @GitHub

Built on top of node-postgres, this library adds the following:

  • Automatic connections
  • Automatic transactions
  • Powerful query-formatting engine + query generation
  • Declarative approach to handling query results
  • Global events reporting for central handling
  • Extensive support for external SQL files
  • Support for all promise libraries

Pg, PostgreSQL client - pure javascript & libpq with the same API. It was authored by Brian Carlson on Dec, 2010.
Pg-Promise, PostgreSQL interface for Node.js. It was authored by Vitaly Tomilov on Mar, 2015.
Sequelize, Sequelize is a promise-based Node.js ORM tool for Postgres, MySQL, MariaDB, SQLite, Microsoft SQL Server, Amazon Redshift and Snowflake’s Data Cloud. It features solid transaction support, relations, eager and lazy loading, read replication and more. It was authored on May, 2011.
Typeorm, Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB databases. It was authored by Umed Khudoiberdiev on Apr, 2016.




Comparing 4 popular NestJS ORMs - LogRocket Blog


No comments: