changing current DB handler for MySQL #1237

This commit is contained in:
SPRINX0\prochazka
2025-11-04 15:20:21 +01:00
parent af69352361
commit 1404685296
5 changed files with 28 additions and 0 deletions

View File

@@ -97,6 +97,12 @@ module.exports = {
socket.emit(`session-initialize-file-${jslid}`);
},
handle_changedCurrentDatabase(sesid, props) {
const { database } = props;
this.dispatchMessage(sesid, `Current database changed to ${database}`);
socket.emit(`session-changedb-${sesid}`, { database });
},
handle_ping() {},
create_meta: true,

View File

@@ -148,6 +148,7 @@ class StreamHandler {
// this.error = this.error.bind(this);
this.done = this.done.bind(this);
this.info = this.info.bind(this);
this.changedCurrentDatabase = this.changedCurrentDatabase.bind(this);
// use this for cancelling - not implemented
// this.stream = null;
@@ -166,6 +167,10 @@ class StreamHandler {
}
}
changedCurrentDatabase(database) {
process.send({ msgtype: 'changedCurrentDatabase', database, sesid: this.sesid });
}
recordset(columns) {
if (this.rowsLimitOverflow) {
return;