Super simple ORM wrapper for Node.js relational databases (MySQL, PostgreSQL, MS SQL Server, etc.) that does not depend on any specific driver. Version 0.1.4 is the latest release, with no known update cadence. It provides a minimal ActiveRecord-like API with Collection and Model classes, allowing raw SQL queries or simple condition-based finders. Unlike full-featured ORMs like Sequelize or TypeORM, it offers no schema migrations, associations, or promise support – it's callback-based and relies on the user to supply a driver that implements the node-mysql query interface.
npm install light-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to MySQL using node-mysql driver, creates a Collection for 'author' table, and retrieves a record by ID.
Wrap callbacks manually or switch to a modern ORM like Sequelize or TypeORM.
Ensure your driver implements the exact signature: query(sql, (err, rows, fields) => {}).Create your own typing or use with @types/light-orm (which does not exist).
Consider migrating to a maintained ORM.
Make sure the driver has a `query` method that accepts (sql, callback) as arguments.
Run `npm install light-orm` and use `require('light-orm')`.Always check the error parameter first: if (err) return console.error(err);
No dependency data recorded yet.