Comparing version 3.9.1 to 3.9.2
@@ -33,3 +33,3 @@ 'use strict'; | ||
this._localStream = null; | ||
this._unpipeStream = function() {}; | ||
this._unpipeStream = function () { }; | ||
this._streamFactory = options.infileStreamFactory; | ||
@@ -159,3 +159,3 @@ this._connection = null; | ||
}; | ||
const onData = function(data) { | ||
const onData = function (data) { | ||
const dataWithHeader = Buffer.allocUnsafe(data.length + 4); | ||
@@ -232,3 +232,3 @@ data.copy(dataWithHeader, 4); | ||
/* eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }] */ | ||
row(packet, _connection) { | ||
row(packet, _connection) { | ||
if (packet.isEOF()) { | ||
@@ -285,3 +285,2 @@ const status = packet.eofStatusFlags(); | ||
stream.push(null); // pushing null, indicating EOF | ||
setImmediate(() => stream.emit('close')); // notify readers that query has completed | ||
}); | ||
@@ -291,2 +290,5 @@ this.on('fields', fields => { | ||
}); | ||
stream.on('end', () => { | ||
stream.emit('close'); | ||
}); | ||
return stream; | ||
@@ -310,3 +312,3 @@ } | ||
} | ||
const err = new Error('Query inactivity timeout'); | ||
@@ -313,0 +315,0 @@ err.errorno = 'PROTOCOL_SEQUENCE_TIMEOUT'; |
{ | ||
"name": "mysql2", | ||
"version": "3.9.1", | ||
"version": "3.9.2", | ||
"description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS", | ||
@@ -85,5 +85,4 @@ "main": "index.js", | ||
"typescript": "^5.0.2", | ||
"urun": "0.0.8", | ||
"utest": "0.0.8" | ||
} | ||
} |
import { setMaxParserCache, clearParserCache } from './ParserCache.js'; | ||
import { | ||
TypeCast, | ||
Field as TypeCastField, | ||
Geometry as TypeCastGeometry, | ||
Next as TypeCastNext, | ||
Type as TypeCastType, | ||
} from './typeCast.js'; | ||
export { setMaxParserCache, clearParserCache }; | ||
export { | ||
setMaxParserCache, | ||
clearParserCache, | ||
TypeCast, | ||
TypeCastField, | ||
TypeCastGeometry, | ||
TypeCastNext, | ||
TypeCastType, | ||
}; |
@@ -1,2 +0,2 @@ | ||
type Geometry = { | ||
export type Geometry = { | ||
x: number; | ||
@@ -6,3 +6,3 @@ y: number; | ||
type Type = { | ||
export type Type = { | ||
type: | ||
@@ -42,3 +42,3 @@ | 'DECIMAL' | ||
type Field = Type & { | ||
export type Field = Type & { | ||
length: number; | ||
@@ -53,4 +53,4 @@ db: string; | ||
type Next = () => void; | ||
export type Next = () => void; | ||
export type TypeCast = ((field: Field, next: Next) => any) | boolean; |
@@ -1,15 +0,10 @@ | ||
declare interface Field { | ||
constructor: { | ||
name: 'Field'; | ||
}; | ||
db: string; | ||
table: string; | ||
name: string; | ||
type: string; | ||
length: number; | ||
string: () => any; | ||
buffer: () => any; | ||
geometry: () => any; | ||
} | ||
// TODO (major version): remove workaround for `Field` compatibility. | ||
import { TypeCastField } from '../../../lib/parsers/index.js'; | ||
/** | ||
* @deprecated | ||
* `Field` is deprecated and might be removed in the future major release. Please use `TypeCastField` type instead. | ||
*/ | ||
declare interface Field extends TypeCastField {} | ||
export { Field }; |
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
602649
18
15203