%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home2/rezakur1/api.rezakurnia.com/zh-router/node_modules/mysql2/lib/commands/
Upload File :
Create Path :
Current File : /home2/rezakur1/api.rezakurnia.com/zh-router/node_modules/mysql2/lib/commands/reset_connection.js

'use strict';

const Command = require('./command');
const Packets = require('../packets/index.js');

class ResetConnection extends Command {
  constructor(callback) {
    super();
    this.onResult = callback;
  }

  start(packet, connection) {
    const req = new Packets.ResetConnection();
    connection.writePacket(req.toPacket());
    return ResetConnection.prototype.resetConnectionResponse;
  }

  resetConnectionResponse(packet, connection) {
    if (connection._statements) {
      connection._statements.clear();
    }
    if (this.onResult) {
      process.nextTick(this.onResult.bind(this, null));
    }
    return null;
  }
}

module.exports = ResetConnection;

Zerion Mini Shell 1.0