mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 23:45:59 +00:00
handle changed current database for MS SQL #1237
This commit is contained in:
@@ -186,7 +186,11 @@ async function tediousStream(dbhan, sql, options) {
|
||||
severity: 'error',
|
||||
});
|
||||
};
|
||||
const handleDatabaseChange = database => {
|
||||
options.changedCurrentDatabase(database);
|
||||
};
|
||||
|
||||
dbhan.client.on('databaseChange', handleDatabaseChange);
|
||||
dbhan.client.on('infoMessage', handleInfo);
|
||||
dbhan.client.on('errorMessage', handleError);
|
||||
const request = new tedious.Request(sql, (err, rowCount) => {
|
||||
|
||||
Reference in New Issue
Block a user