
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
mysql-easy-pool
Advanced tools
MySql connections' pool wrapper to handle the connections, mainly with the transactions, more easily.
This module exports an object to handle with the mysql connection's pool more easily. We can use the getConnection() function to get one connection for execute our queries, or we can use the getTransactionConnection() function to get one connection inside a transaction that performs the rollback action if any error occurred.
The purpose of this module is to act like a helper for the great mysql module.
npm install mysql-easy-pool
const MySqlEasyPool = require('mysql-easy-pool')
const mysqlPool = new MySqlEasyPool({
host: process.env.HOST,
user: process.env.USER,
password: process.env.PASS,
database: process.env.DB
})
mysqlPool.getConnection((connection, done) => {
// create the queries
connection.query(SQL STATEMENT, [...], (err, res) => {
done(err, res)
})
}, callback)
mysqlPool.getTransactionConnection((connection, done) => {
// create the queries
async.waterfall([
(cb) => {
connection.query(SQL STATEMENT ONE, [...], (err, res) => cb(err, res))
},
(res, cb) => {
connection.query(SQL STATEMENT TWO, [...], (err, res) => cb(err, res))
}
],
(err, res) => {
done(err, res)
})
}, callback)
> Where the callback function receives the error or the result, like: function(err, result) = { ... }
> You can use the getter function 'pool', like "mysqlPool.pool", for set extra options to the pool.
FAQs
MySql connections' pool wrapper to handle the connections, mainly with the transactions, more easily.
We found that mysql-easy-pool demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.