Comparing version 3.5.2 to 3.6.0
@@ -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; |
@@ -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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
605747
15046