🚀 Introducing mysql2-helper-lite – A Lightweight MySQL Helper for Node.js Developers!
I’m excited to launch mysql2-helper-lite, a powerful yet lightweight helper library designed to simplify database operations with mysql2/promise. If you’re tired of writing repetitive SQL queries and managing complex transactions manually, this package is for you!
🔥 Why Use mysql2-helper-lite?
✅ Less Boilerplate Code – Perform database operations with simple function calls instead of writing raw SQL.
✅ Easy Insert & Update – Pass objects directly to insert or update queries, no need to manually write field names.
✅ Automatic Joins – Easily join related tables without writing complex SQL joins.
✅ Transaction Handling – Execute multiple queries in a single transaction with built-in rollback support.
✅ Audit Logging – Keep track of changes with automatic audit logs.
✅ Auto-generate REST APIs – Create APIs in seconds with Express integration.
🛠️ Installation & Usage
Install via NPM:
npm install mysql2-helper-lite
Example Usage:
const db = require('mysql2-helper-lite');
// Insert a record
await db.insert('users', { name: 'John Doe', email: '[email protected]' });
// Fetch data with conditions
const users = await db.select('users', { where: { email: '[email protected]' } });
console.log(users);
This package is designed for developers who value efficiency and want to focus on building features rather than handling repetitive database queries.
Check it out & let me know your thoughts!
🔗 Git-https://github.com/piyaldeb/mysql2-helper-lite
Npm - https://www.npmjs.com/package/mysql2-helper-lite
📦 npm install mysql2-helper-lite