A minimal, PostgreSQL-only ORM for Node.js (v0.7.2) that emphasizes simplicity and explicit control over magic. It provides a Record class for table mapping with field definitions, primary keys, and automatic change tracking. Connections are managed via a default pool or explicit pool/connection passing, with helpers for transactions and single-connection scopes. Unlike full-featured ORMs like Sequelize or TypeORM, Supple SQL has no migrations, no associations, and uses raw SQL for queries beyond basic CRUD. Release cadence is sporadic; the library is stable but not actively developed. Requires Node >=16.3.0 and a PostgreSQL client (e.g., 'pg' module).
npm install supple-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows setting up a pool, defining a Record, inserting, and querying by primary key.
Check return value of load() or use findOne() which returns null on miss.
Always check the boolean return value to confirm the save actually happened.
Ensure all database columns are declared in fields.
Use SQL.transaction() callback and pass conn as first argument to constructors.
Run `npm install supple-sql`. Use `import SQL from 'supple-sql'` for ESM or `const SQL = require('supple-sql')` for CJS.Use `import SQL from 'supple-sql'` not `import { SQL } from 'supple-sql'`.Run `CREATE TABLE users (...)` manually; Supple SQL does not auto-migrate.