You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

mysqlprocedures

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysqlprocedures

Package for calling stored procedures dynamically for any mysql connection with error handling

1.11.0
latest
npmnpm
Version published
Maintainers
1
Created
Source

StoredProcedureCaller

A simple Node.js module for calling stored procedures using MySQL.

Installation

Install the package using npm:

npm install mysqlprocedures



#Usage

const StoredProcedureCaller = require('mysqlprocedures');

// Set up MySQL connection configuration
const dbConfig = {
  host: 'your-host',
  user: 'your-username',
  password: 'your-password',
  database: 'your-database',
};

// Create an instance of StoredProcedureCaller
const storedProcedureCaller = new StoredProcedureCaller(dbConfig);

// Define the stored procedure name and input parameters
const procedureName = 'your_stored_procedure';
const inputs = [param1, param2, param3]; // replace with your actual parameters

// Call the stored procedure
storedProcedureCaller.callStoredProcedure(procedureName, inputs, (error, results) => {
  if (error) {
    console.error('Error:', error);
  } else {
    console.log('Results:', results);
  }

  // Close the MySQL connection
  storedProcedureCaller.closeConnection();
});

FAQs

Package last updated on 12 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.