๐ 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: 'john@example.com' });
// Fetch data with conditions
const users = await db.select('users', { where: { email: 'john@example.com' } });
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
Top comments (0)