创建并连接数据库,并修改登录和注册接口

This commit is contained in:
2026-08-30 18:14:49 +08:00
parent 4d11a1237f
commit 51c41e8fb7
331 changed files with 90228 additions and 16 deletions
+29
View File
@@ -0,0 +1,29 @@
'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;