A lightweight MySQL helper library using async/await syntax (ES2017) for Node.js. Version 0.2.1 provides a singleton-based wrapper around the mysql package with methods for select, selectOne, insertInto, batchInsertInto, replaceInto, update, and delete. It supports simple and range WHERE conditions. Designed for Node.js v8+, it is a minimal alternative to more full-featured ORMs like Sequelize or TypeORM. No TypeScript types included; for TS support, see ts-mysql-helper.
npm install mysql-helper-es6No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize the MySQL helper with connection config and perform a simple select query using async/await.
Consider migrating to mysql2 with promise wrapper, or use an ORM like Sequelize.
If you need multiple connections, avoid using the singleton; instead manage separate instances manually.
Use mysql2 or another driver that exposes pool options, or wrap the library with custom pool management.
Refer to README for supported operators; for complex queries, consider writing raw SQL.
Use const MysqlHelper = require('mysql-helper-es6');Run npm install mysql-helper-es6 and ensure you are not using a relative path incorrectly.
Ensure you call MysqlHelper.getInstance({host, user, password, database...}); config must have required fields.