Fadab MySQL Helper is a lightweight Promise-based wrapper for felixge's node-mysql library, providing convenience functions for selecting, inserting, updating, and upserting records with automatic connection pooling. Version 1.4.2 is the latest stable release, with a low update cadence. It requires a fadab.config.js or fadab.config.ts file in the project root for database configuration. Key differentiators include a very slim codebase with only two dependencies, support for advanced query building with where conditions, ordering, limits, and random selection, and full TypeScript support.
npm install fadab-mysql-helperNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to insert a record and then select it using the library's Promise-based methods.
Create a fadab.config file with a 'mysql' property containing connection details.
Manually specify config path or use environment variables for connection.
Refer to documentation for correct condition types (e.g., { key: 'age', value: 18, conditionType: 'gte' }).Use the underlying 'mysql' library directly if raw queries are needed.
Switch to a different MySQL helper that uses mysql2, or configure the library to use mysql2 (not officially supported).
Run 'npm install fadab-mysql-helper --save'.
Create fadab.config.js or fadab.config.ts in project root with valid MySQL connection options.
Use 'const FadabMysql = require('fadab-mysql-helper');' and call FadabMysql.selectAsync.Check host, user, password, and database in config file.
Verify MySQL host and port, ensure server is running and accessible.