Update Bot
This commit is contained in:
2
node_modules/mysql2/lib/commands/client_handshake.js
generated
vendored
2
node_modules/mysql2/lib/commands/client_handshake.js
generated
vendored
@@ -48,6 +48,7 @@ class ClientHandshake extends Command {
|
||||
|
||||
sendCredentials(connection) {
|
||||
if (connection.config.debug) {
|
||||
// eslint-disable-next-line
|
||||
console.log(
|
||||
'Sending handshake packet: flags:%d=(%s)',
|
||||
this.clientFlags,
|
||||
@@ -110,6 +111,7 @@ class ClientHandshake extends Command {
|
||||
});
|
||||
this.handshake = Packets.Handshake.fromPacket(helloPacket);
|
||||
if (connection.config.debug) {
|
||||
// eslint-disable-next-line
|
||||
console.log(
|
||||
'Server hello packet: capability flags:%d=(%s)',
|
||||
this.handshake.capabilityFlags,
|
||||
|
||||
7
node_modules/mysql2/lib/commands/query.js
generated
vendored
7
node_modules/mysql2/lib/commands/query.js
generated
vendored
@@ -39,7 +39,7 @@ class Query extends Command {
|
||||
then() {
|
||||
const err =
|
||||
"You have tried to call .then(), .catch(), or invoked await on the result of query that is not a promise, which is a programming error. Try calling con.promise().query(), or require('mysql2/promise') instead of 'mysql2' for a promise-compatible version of the query interface. To learn how to use async/await or Promises check out documentation at https://sidorares.github.io/node-mysql2/docs#using-promise-wrapper, or the mysql2 documentation at https://sidorares.github.io/node-mysql2/docs/documentation/promise-wrapper";
|
||||
|
||||
// eslint-disable-next-line
|
||||
console.log(err);
|
||||
throw new Error(err);
|
||||
}
|
||||
@@ -47,6 +47,7 @@ class Query extends Command {
|
||||
/* eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }] */
|
||||
start(_packet, connection) {
|
||||
if (connection.config.debug) {
|
||||
// eslint-disable-next-line
|
||||
console.log(' Sending query command: %s', this.sql);
|
||||
}
|
||||
this._connection = connection;
|
||||
@@ -118,6 +119,7 @@ class Query extends Command {
|
||||
const rs = new Packets.ResultSetHeader(packet, connection);
|
||||
this._fieldCount = rs.fieldCount;
|
||||
if (connection.config.debug) {
|
||||
// eslint-disable-next-line
|
||||
console.log(
|
||||
` Resultset header received, expecting ${rs.fieldCount} column definition packets`
|
||||
);
|
||||
@@ -199,10 +201,12 @@ class Query extends Command {
|
||||
);
|
||||
this._fields[this._resultIndex].push(field);
|
||||
if (connection.config.debug) {
|
||||
/* eslint-disable no-console */
|
||||
console.log(' Column definition:');
|
||||
console.log(` name: ${field.name}`);
|
||||
console.log(` type: ${field.columnType}`);
|
||||
console.log(` flags: ${field.flags}`);
|
||||
/* eslint-enable no-console */
|
||||
}
|
||||
}
|
||||
// last field received
|
||||
@@ -231,6 +235,7 @@ class Query extends Command {
|
||||
return this.row;
|
||||
}
|
||||
|
||||
/* eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }] */
|
||||
row(packet, _connection) {
|
||||
if (packet.isEOF()) {
|
||||
const status = packet.eofStatusFlags();
|
||||
|
||||
1
node_modules/mysql2/lib/commands/server_handshake.js
generated
vendored
1
node_modules/mysql2/lib/commands/server_handshake.js
generated
vendored
@@ -168,6 +168,7 @@ class ServerHandshake extends Command {
|
||||
if (connection.listeners('packet').length) {
|
||||
connection.emit('packet', packet.clone(), knownCommand, commandCode);
|
||||
} else if (!knownCommand) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Unknown command:', commandCode);
|
||||
}
|
||||
return ServerHandshake.prototype.dispatchCommands;
|
||||
|
||||
Reference in New Issue
Block a user