Comparing version 3.3.2 to 3.4.0
@@ -99,2 +99,4 @@ // SPDX-License-Identifier: LGPL-2.1-or-later | ||
return readBinaryBuffer; | ||
case FieldType.JSON: | ||
return opts.jsonStrings ? readStringBinary : readJsonBinary; | ||
@@ -271,3 +273,2 @@ default: | ||
DEFAULT_SIGNED_PARSER_TYPE[FieldType.TIME] = readTimeBinary; | ||
DEFAULT_SIGNED_PARSER_TYPE[FieldType.JSON] = readJsonBinary; | ||
@@ -284,2 +285,1 @@ const DEFAULT_UNSIGNED_PARSER_TYPE = Array(256); | ||
DEFAULT_UNSIGNED_PARSER_TYPE[FieldType.TIME] = readTimeBinary; | ||
DEFAULT_UNSIGNED_PARSER_TYPE[FieldType.JSON] = readJsonBinary; |
@@ -37,2 +37,5 @@ // SPDX-License-Identifier: LGPL-2.1-or-later | ||
case FieldType.JSON: | ||
return opts.jsonStrings ? readStringLengthEncoded : readJson; | ||
default: | ||
@@ -198,2 +201,1 @@ if (col.dataTypeFormat && col.dataTypeFormat === 'json' && opts.autoJsonMap) { | ||
DEFAULT_PARSER_TYPE[FieldType.TIME] = readAsciiStringLengthEncoded; | ||
DEFAULT_PARSER_TYPE[FieldType.JSON] = readJson; |
@@ -20,2 +20,3 @@ // SPDX-License-Identifier: LGPL-2.1-or-later | ||
client_ed25519: require('./auth/ed25519-password-auth'), | ||
parsec: require('./auth/parsec-auth'), | ||
dialog: require('./auth/pam-password-auth'), | ||
@@ -22,0 +23,0 @@ sha256_password: require('./auth/sha256-password-auth'), |
@@ -195,2 +195,6 @@ // SPDX-License-Identifier: LGPL-2.1-or-later | ||
} | ||
if (this.inStream) { | ||
this.handleNewRows(okPacket); | ||
} | ||
if (!mustRedirect) { | ||
@@ -197,0 +201,0 @@ if ( |
@@ -118,3 +118,8 @@ // SPDX-License-Identifier: LGPL-2.1-or-later | ||
this.keepAliveDelay = opts.keepAliveDelay === undefined ? 0 : opts.keepAliveDelay; | ||
if (!opts.keepAliveDelay) { | ||
// for mysql2 compatibility, check keepAliveInitialDelay/enableKeepAlive options. | ||
if (opts.enableKeepAlive === true && opts.keepAliveInitialDelay !== undefined) { | ||
this.keepAliveDelay = opts.keepAliveInitialDelay; | ||
} | ||
} | ||
this.trace = opts.trace || false; | ||
@@ -132,2 +137,6 @@ | ||
this.autoJsonMap = opts.autoJsonMap === undefined ? true : opts.autoJsonMap; | ||
this.jsonStrings = opts.jsonStrings || false; | ||
if (opts.jsonStrings !== undefined) { | ||
this.autoJsonMap = !this.jsonStrings; | ||
} | ||
this.bitOneIsBoolean = opts.bitOneIsBoolean === undefined ? true : opts.bitOneIsBoolean; | ||
@@ -225,2 +234,9 @@ this.arrayParenthesis = opts.arrayParenthesis || false; | ||
if (opts.bitOneIsBoolean) opts.bitOneIsBoolean = opts.bitOneIsBoolean === 'true'; | ||
if (opts.jsonStrings) opts.jsonStrings = opts.jsonStrings === 'true'; | ||
// mysql2 compatibility | ||
// for mysql2 compatibility, check keepAliveInitialDelay/enableKeepAlive options. | ||
if (opts.enableKeepAlive) opts.enableKeepAlive = opts.enableKeepAlive === 'true'; | ||
if (opts.keepAliveInitialDelay) opts.keepAliveInitialDelay = parseInt(opts.keepAliveInitialDelay); | ||
return opts; | ||
@@ -227,0 +243,0 @@ } |
@@ -865,2 +865,7 @@ // SPDX-License-Identifier: LGPL-2.1-or-later | ||
this.socket = Net.connect(this.opts.socketPath); | ||
if (this.opts.enableKeepAlive) { | ||
this.stream.on('connect', () => { | ||
this.stream.setKeepAlive(true, this.opts.keepAliveInitialDelay); | ||
}); | ||
} | ||
} else if (this.opts.stream) { | ||
@@ -867,0 +872,0 @@ if (typeof this.opts.stream === 'function') { |
{ | ||
"name": "mariadb", | ||
"version": "3.3.2", | ||
"version": "3.4.0", | ||
"description": "fast mariadb or mysql connector.", | ||
@@ -5,0 +5,0 @@ "main": "promise.js", |
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
662477
74
16758