StackerJS ORM is a lightweight DataMapper-style ORM for Node.js, version 1.4.2. Designed for use within or outside the StackerJS framework, it provides straightforward CRUD operations with a metadata-driven entity definition and repository pattern. Key features include support for MySQL, filtering with comparison operators (eq, neq, gt, gte, lt, lte, in, nin), and a simple query API (findById, findOne, findAll). The package has a low release cadence, with the last update in early 2019, and requires Node.js >=7.10. It stands out for its minimalistic approach compared to heavier ORMs like Sequelize, but lacks built-in migration tools and advanced relationship mapping.
npm install stackerjs-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines an entity with metadata, creates a repository extending the base Repository, and queries by ID.
Use import syntax instead of require().
Always include a 'type' property for each field in the metadata.
Ensure you create an instance: const repo = new UserRepository();
Consider migrating to an actively maintained ORM like Sequelize or TypeORM.
Use only valid comparison terms: eq, neq, gt, gte, lt, lte, in, nin.
Add this.entity = new User(); inside your repository constructor.
Replace require() with import statements.
Add 'type': 'module' in package.json or use .mjs file extension.