mysql-helper-kit

1.0.4 • Public • Published

mysql-helper-kit

MySQL-Helper-Kit is a Node.js package that simplifies and enhances the way you work with MySQL databases. It provides a range of utilities to streamline your database operations, making your MySQL interactions easier, more efficient, and secure.

Installation

You can install "mysql-helper-kit" via npm:

npm install mysql-helper-kit

Getting Started

To get started with "mysql-helper-kit," follow these simple steps:

  1. Import the package into your Node.js application:
import { read, update, create, execute, startTransaction, rollbackTransaction, commitTransaction, getSingleConnection, releaseSingleConnection, initConnection } from 'mysql-helper-kit';
  1. Configure the package by creating a configuration object:
const config = {
  host: "your-database-host",
  port: 3306, // Your MySQL port
  database: "your-database-name",
  password: "your-database-password",
  user: "your-database-username",
  // Other optional configuration parameters
};
  1. Initialize a connection:
initConnection(config);
  1. You're ready to use the package for various database operations. Here are some examples:

Reading from the Database

const results = await read('your-table-name', 'column1, column2', { condition1: 'value1' });

Updating Records

const updatedRows = await update('your-table-name', { column1: 'new-value' }, { condition1: 'value1' });

Inserting Records

const newRecord = await create('your-table-name', { column1: 'value1' });

Executing Custom Queries

const customResults = await execute('SELECT * FROM your-table-name WHERE column1 = ?', ['value1']);

Features

  • Ease of Use: MySQL-Helper-Kit offers an intuitive and developer-friendly API, reducing the complexity of working with MySQL databases.

  • Efficiency: Optimize your database interactions with efficient queries and data manipulation.

  • Secure Practices: Built with security in mind, MySQL-Helper-Kit incorporates best practices for protecting your data.

  • Flexibility: Whether you're building a small application or a large-scale project, MySQL-Helper-Kit adapts to your needs.

  • Community Support: Join a growing community of developers using MySQL-Helper-Kit for help, tips, and collaboration.


Package Sidebar

Install

npm i mysql-helper-kit

Weekly Downloads

5

Version

1.0.4

License

ISC

Unpacked Size

59.5 kB

Total Files

8

Last publish

Collaborators

  • rayiecoder