A fast PostgreSQL ORM for Node.js providing CRUD operations with model-based classes. Current stable version is 2.3.1, released on an as-needed basis. It offers PGActiveModel, PGBaseModel, PGEncryptModel, and PGConnecter classes to build custom models with encryption, property management, and active record patterns. Differentiators include built-in encryption support and simple static CRUD methods like findById, updateById, deleteById, and findAll. It is a lightweight alternative to heavier ORMs like Sequelize or TypeORM, focusing on direct PostgreSQL interaction without complex query builders.
npm install adostNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to define a model with PGBaseModel, initialize connection, create a record, and query all records.
Ensure each model class has a static getter named 'connection' that calls PGConnecter.init.
Switch to ES module imports: import { PGActiveModel } from 'adost'.Reference PGTypes constants: { type: PGTypes.VARCHAR(255) }.Use 'findLimitedBy' instead.
Call PGConnecter.init at application startup before any model usage.
Use proper ESM import: import { PGActiveModel } from 'adost';Add static get connection() { return PGConnecter.init({...}); } to your model class initiated before use.Ensure each field in the static get fields() includes a 'type' from PGTypes.
Create the table manually or use a migration tool; Adost does not auto-create tables.