Skip to content

Commit da9d574

Browse files
fixed bug with list of databases being refreshed
1 parent f68007f commit da9d574

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

lib/connectionCapabilities.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ ConnectionCapabilities.prototype.removeDB = function (dbid, srvr) {
172172
const dbidCap = this.dbCapabilityID(dbid);
173173
if (dbidCap && this.connection[url] && this.connection[url][dbidCap]) {
174174
delete this.connection[url][dbidCap];
175-
}
175+
}
176176
};
177177

178178
/**

lib/woqlClient.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ WOQLClient.prototype.deleteDatabase = function (dburl, key) {
127127
new URIError(ErrorMessage.getInvalidURIMessage(dburl, 'Delete Database'))
128128
);
129129
}
130+
const dbid = this.connectionConfig.dbid
130131
const opts = {};
131132

132133
if (key) {
@@ -136,7 +137,7 @@ WOQLClient.prototype.deleteDatabase = function (dburl, key) {
136137
const self = this;
137138
return this.dispatch(`${this.connectionConfig.dbURL()}`, CONST.DELETE_DATABASE, opts).then(
138139
(response) => {
139-
self.connection.removeDB();
140+
self.connection.removeDB(dbid);
140141
return response;
141142
}
142143
);

test/woqlQuery.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,6 @@ describe('pre-roll queries', function () {
307307
//console.log(JSON.stringify(woqlObject.getDocumentConnections("docid").json()));
308308
const jsonObj={ limit: [ 2, { start: [ 0, { "and": [
309309
{ "eq" : ["v:Docid", "doc:docid"]},
310-
{ "triple": [ "v:Entid", "rdf:type", "v:Enttype"] },
311-
{ "sub": [ "v:Enttype", "tcs:Document"] },
312310
{ "or": [
313311
{ "triple": [
314312
"doc:docid",
@@ -320,6 +318,8 @@ describe('pre-roll queries', function () {
320318
"doc:docid",
321319
] },
322320
] },
321+
{ "triple": [ "v:Entid", "rdf:type", "v:Enttype"] },
322+
{ "sub": [ "v:Enttype", "tcs:Document"] },
323323
{ "opt": [ { "triple": [
324324
"v:Entid",
325325
"rdfs:label",

0 commit comments

Comments
 (0)