mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 13:06:01 +00:00
client metadata caching
This commit is contained in:
@@ -39,14 +39,14 @@ module.exports = {
|
||||
} else {
|
||||
res = await this.datastore.insert(connection);
|
||||
}
|
||||
socket.emit('connection-list-changed');
|
||||
socket.emitChanged('connection-list-changed');
|
||||
return res;
|
||||
},
|
||||
|
||||
delete_meta: 'post',
|
||||
async delete(connection) {
|
||||
const res = await this.datastore.remove(_.pick(connection, '_id'));
|
||||
socket.emit('connection-list-changed');
|
||||
socket.emitChanged('connection-list-changed');
|
||||
return res;
|
||||
},
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ module.exports = {
|
||||
const existing = this.opened.find((x) => x.conid == conid && x.database == database);
|
||||
if (!existing) return;
|
||||
existing.structure = structure;
|
||||
socket.emit(`database-structure-changed-${conid}-${database}`);
|
||||
socket.emitChanged(`database-structure-changed-${conid}-${database}`);
|
||||
},
|
||||
handle_error(conid, database, props) {
|
||||
const { error } = props;
|
||||
|
||||
@@ -9,7 +9,7 @@ module.exports = {
|
||||
const existing = this.opened.find(x => x.conid == conid);
|
||||
if (!existing) return;
|
||||
existing.databases = databases;
|
||||
socket.emit(`database-list-changed-${conid}`);
|
||||
socket.emitChanged(`database-list-changed-${conid}`);
|
||||
},
|
||||
handle_error(conid, { error }) {
|
||||
console.log(`Error in server connection ${conid}: ${error}`);
|
||||
|
||||
Reference in New Issue
Block a user