Gathering detailed insights and metrics for promise-mysql
Gathering detailed insights and metrics for promise-mysql
Gathering detailed insights and metrics for promise-mysql
Gathering detailed insights and metrics for promise-mysql
sequelize
Sequelize is a promise-based Node.js ORM tool for Postgres, MySQL, MariaDB, SQLite, Microsoft SQL Server, Amazon Redshift and Snowflake’s Data Cloud. It features solid transaction support, relations, eager and lazy loading, read replication and more.
node-mysql-promise
node mysql model based on promise
mysql-promise
Small wrapper for mysql that use promises.
hi-mysql
promise for github.com/mysqljs/mysql
A wrapper for mysqljs/mysql that wraps function calls with Bluebird promises.
npm install promise-mysql
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
337 Stars
206 Commits
61 Forks
13 Watchers
28 Branches
22 Contributors
Updated on May 01, 2025
Latest Version
5.2.0
Package Id
promise-mysql@5.2.0
Unpacked Size
24.95 kB
Size
5.96 kB
File Count
12
NPM Version
6.12.1
Node Version
12.13.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
3
Promise-mysql is a wrapper for mysqljs/mysql that wraps function calls with Bluebird promises.
This will return a the promise of a connection object.
connectionOptions
object: A connectionOptions object
A Bluebird Promise
that resolves to a connection object
This will return a the promise of a pool object.
poolOptions
object: A poolOptions object
A Bluebird Promise
that resolves to a pool object
This will return a the promise of a poolCluster object.
poolClusterOptions
object: A poolClusterOptions object
A Bluebird Promise
that resolves to a poolCluster object
In addition to the connection options in mysqljs/mysql, promise-mysql accepts the following:
returnArgumentsArray
boolean: If set to true then methods will return an array with the callback arguments from the underlying method (excluding the any errors) and the return value from the call.
mysqlWrapper
function: A function that is passed the mysql
object so that it can be wrapped with something like the aws-xray-sdk module. This function must either return the wrapped mysql
object, return a promise of the wrapped mysql
object or call the callback that is passed into the function.
reconnect
boolean (default: true): If set to true then the connection will reconnect on the PROTOCOL_CONNECTION_LOST
, ECONNRESET
and PROTOCOL_ENQUEUE_AFTER_FATAL_ERROR
errors.
mysql
mysql object: The mysql object
callback(error, success)
function: A node-style callback that can be used to pass the wrapped version of the mysql object out of the wrapper function.
connection.query
: Perform a query. See mysqljs/mysql documentation
connection.queryStream
: Perform a query, but return the query object for streaming. See mysqljs/mysql documentation
connection.beginTransaction
: Begin a transaction. See mysqljs/mysql documentation
connection.commit
: Commit a transaction. See mysqljs/mysql documentation
connection.rollback
: Roll back a transaction. See mysqljs/mysql documentation
connection.changeUser
: Change the current connected user. See mysqljs/mysql documentation
connection.ping
: Send a ping to the server. See mysqljs/mysql documentation
connection.end
: End the connection. See mysqljs/mysql documentation
connection.destroy
: Destroy the connection. See mysqljs/mysql documentation
connection.pause
: Pause a connection. See mysqljs/mysql documentation
connection.resume
: Resume a connection. See mysqljs/mysql documentation
connection.escape
: Escape query values. See mysqljs/mysql documentation
connection.escapeId
: Escape query identifiers. See mysqljs/mysql documentation
connection.format
: Prepare a query. See mysqljs/mysql documentation
connection.on
: Add a listener to the connection object. See mysqljs/mysql documentation for events that may be listened for.
In addition to the pool options in mysqljs/mysql, promise-mysql accepts the following:
returnArgumentsArray
boolean: If set to true then methods will return an array with the callback arguments from the underlying method (excluding the any errors) and the return value from the call.
mysqlWrapper
function: A function that is passed the mysql
object so that it can be wrapped with something like the aws-xray-sdk module. This function must either return the wrapped mysql
object, return a promise of the wrapped mysql
object or call the callback that is passed into the function.
mysql
mysql object: The mysql object
callback(error, success)
function: A node-style callback that can be used to pass the wrapped version of the mysql object out of the wrapper function.
pool.getConnection
: Get a poolConnection from the pool. See mysqljs/mysql documentation
pool.query
: Get a connection from the pool, run a query and then release it back into the pool. See mysqljs/mysql documentation
pool.end
: End all the connections in a pool. See mysqljs/mysql documentation
pool.escape
: Escape query values. See mysqljs/mysql documentation
pool.escapeId
: Escape query identifiers. See mysqljs/mysql documentation
pool.on
: Add a listener to the pool object. See mysqljs/mysql documentation for events that may be listened for.
In addition to the methods in the connection object, poolConnections also has the following method:
poolConnection.release
: Release a connection back to the pool. See mysqljs/mysql documentation
The options used to create a pool cluster. See mysqljs/mysql documentation
poolCluster.add
: Adds a pool configuration. See mysqljs/mysql documentation
poolCluster.remove
: Removes pool configurations. See mysqljs/mysql documentation
poolCluster.getConnection
: Get a poolConnection from the pool cluster. See mysqljs/mysql documentation
poolCluster.of
: Get a pool from the pool cluster. See mysqljs/mysql documentation
poolCluster.end
: End all the connections in a pool cluster. See mysqljs/mysql documentation
poolCluster.on
: Add a listener to the pool cluster object. See mysqljs/mysql documentation for events that may be listened for.
The main difference is that mysql.createPool
now returns a promise. Besides this, the API is the same and you should be able to upgrade straight to v4. The only other difference is the extra options in the connectionOptions object.
The pool.releaseConnection
has been removed, please use poolConnection.release
instead.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 4/16 approved changesets -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
14 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More