Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@goodware/mysql

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@goodware/mysql - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

9

MySql.js
/* eslint-disable no-param-reassign */
/* eslint-disable no-await-in-loop */

@@ -250,3 +251,2 @@ const AWS = require('aws-sdk');

// 'connection' will be usable if an exception is not thrown
// eslint-disable-next-line no-await-in-loop
connection = await (this.usePool

@@ -257,7 +257,5 @@ ? this.connectionPool.getConnection()

if (useTransaction) {
// eslint-disable-next-line no-await-in-loop
await connection.beginTransaction();
} else {
// Test the connection
// eslint-disable-next-line no-await-in-loop
await connection.query('SELECT 1');

@@ -267,6 +265,4 @@ }

// throw new Error('Test scenario 4 - App fails');
// eslint-disable-next-line no-await-in-loop
const ret = await task(connection);
// throw new Error('Test scenario 1 - Commit fails');
// eslint-disable-next-line no-await-in-loop
if (useTransaction) await connection.commit();

@@ -300,3 +296,2 @@ return ret;

// throw new Error('Test scenario 2 - Rollback fails');
// eslint-disable-next-line no-await-in-loop
await connection.rollback();

@@ -395,3 +390,2 @@ } catch (error2) {

const delay = delayMs;
// eslint-disable-next-line no-await-in-loop
await new Promise((resolve) => setTimeout(resolve, delay));

@@ -402,3 +396,2 @@ } finally {

// throw new Error('Test scenario 6 - Release fails');
// eslint-disable-next-line no-await-in-loop
await (this.usePool ? connection.release() : connection.end());

@@ -405,0 +398,0 @@ } catch (error) {

4

package.json
{
"name": "@goodware/mysql",
"version": "1.0.5",
"description": "Database connection and execution utility for the mysql2 npm package",
"version": "1.0.6",
"description": "A mysql2-based connection helper",
"keywords": [

@@ -6,0 +6,0 @@ "mysql",

@@ -1,2 +0,2 @@

# mysql2 utility for NodeJS
# @goodware/mysql: A mysql2-based connection helper

@@ -21,4 +21,4 @@ Better Documentation is coming

- Creates mysql2-promise Connections, optionally from a pool
- Creates database connections via mysql2-promise, optionally from a pool, with backoff retry
- Handles AWS RDS passwordless IAM connections
- Manages database transactions by wrapping begin/end around a function invocation

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc