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.9.1 to 3.9.2

12

lib/commands/query.js

@@ -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 };
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