An enhancement to the mysql npm package providing easy transaction handling, a simple ORM with automatic schema detection, optimistic locking, automatic timestamp management, and row-level locking. Current stable version is 0.4.2. The package wraps the popular mysql driver and adds convenience features. It depends on better-js-class, cps, mysql, and underscore. Unlike higher-level ORMs, it remains close to the raw SQL layer while offering transaction, cursor, and table/row abstraction. Release cadence is irregular, with last update in 2016, indicating maintenance mode.
npm install node-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic setup: create DB instance with transaction support, define ORM classes, connect, and run a transaction with row creation.
Add useTransaction field to DB constructor options (e.g., { useTransaction: { connectionLimit: 1 } }).Add useCursor field to DB constructor options.
Migrate to a maintained MySQL library.
Wrap callbacks in promises manually or use promisify.
Add { useTransaction: { connectionLimit: 1 } } to the DB constructor options.Add { useCursor: { ... } } to the DB constructor options.Run npm install to install all dependencies.