Socket
Socket
Sign inDemoInstall

mysql2

Package Overview
Dependencies
Maintainers
3
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql2 - npm Package Compare versions

Comparing version 3.5.2 to 3.6.0

2

lib/connection_config.js

@@ -33,2 +33,3 @@ // This file was modified by Oracle on September 21, 2021.

insecureAuth: 1,
infileStreamFactory: 1,
isServer: 1,

@@ -112,2 +113,3 @@ keepAliveInitialDelay: 1,

this.insecureAuth = options.insecureAuth || false;
this.infileStreamFactory = options.infileStreamFactory || undefined;
this.supportBigNumbers = options.supportBigNumbers || false;

@@ -114,0 +116,0 @@ this.bigNumberStrings = options.bigNumberStrings || false;

17

lib/connection.js

@@ -618,6 +618,11 @@ // This file was modified by Oracle on June 1, 2021.

execute(sql, values, cb) {
let options = {};
let options = {
infileStreamFactory: this.config.infileStreamFactory
};
if (typeof sql === 'object') {
// execute(options, cb)
options = sql;
options = {
...options,
...sql
};
if (typeof values === 'function') {

@@ -903,7 +908,11 @@ cb = values;

let options = {
rowsAsArray: config.rowsAsArray
rowsAsArray: config.rowsAsArray,
infileStreamFactory: config.infileStreamFactory
};
if (typeof sql === 'object') {
// query(options, cb)
options = sql;
options = {
...options,
...sql
};
if (typeof values === 'function') {

@@ -910,0 +919,0 @@ cb = values;

{
"name": "mysql2",
"version": "3.5.2",
"version": "3.6.0",
"description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,2 +7,3 @@ // This file was modified by Oracle on November 04, 2021.

import { EventEmitter } from 'events';
import { Readable } from 'stream';
import { Query, QueryError } from './protocol/sequences/Query.js';

@@ -170,2 +171,7 @@ import { Prepare, PrepareStatementInfo } from './protocol/sequences/Prepare.js';

/**
* By specifying a function that returns a readable stream, an arbitrary stream can be sent when sending a local fs file.
*/
infileStreamFactory?: (path: string) => Readable;
/**
* Determines if column values should be converted to native JavaScript types. It is not recommended (and may go away / change in the future)

@@ -172,0 +178,0 @@ * to disable type casting, but you can currently do so on either the connection or query level. (Default: true)

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