@bbn/bbn 2.0.244 → 2.0.246
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bbn.js +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/bbn.sw.js +1 -1
- package/dist/bbn.sw.js.map +1 -1
- package/dist/db/classes/Object.js +5 -5
- package/package.json +1 -1
|
@@ -499,14 +499,14 @@ const db = {
|
|
|
499
499
|
if (conn) {
|
|
500
500
|
conn.close();
|
|
501
501
|
delete this._connections[database];
|
|
502
|
-
log("Closing connection to database: " + database);
|
|
502
|
+
//log("Closing connection to database: " + database);
|
|
503
503
|
}
|
|
504
504
|
if (this._objects[database]) {
|
|
505
505
|
delete this._objects[database];
|
|
506
506
|
}
|
|
507
507
|
},
|
|
508
508
|
updateStructure(storeName, structure, database) {
|
|
509
|
-
log("fn updateStructure, table: " + storeName + ", in SW? " + !globalThis.document)
|
|
509
|
+
//log("fn updateStructure, table: " + storeName + ", in SW? " + !globalThis.document)
|
|
510
510
|
const primary = getPrimaryKey(structure);
|
|
511
511
|
if (!database.objectStoreNames.contains(storeName)) {
|
|
512
512
|
const store = database.createObjectStore(storeName, {
|
|
@@ -575,7 +575,7 @@ const db = {
|
|
|
575
575
|
});
|
|
576
576
|
},
|
|
577
577
|
async reopenWithUpgrade(name) {
|
|
578
|
-
log("fn reopenWithUpgrade", this._structures)
|
|
578
|
+
//log("fn reopenWithUpgrade", this._structures)
|
|
579
579
|
if (!this._structures[name]) {
|
|
580
580
|
throw new Error(_('Impossible to find a structure for the database %s', name));
|
|
581
581
|
}
|
|
@@ -588,7 +588,7 @@ const db = {
|
|
|
588
588
|
return await this.open(name, nextVersion);
|
|
589
589
|
},
|
|
590
590
|
async open(database, version) {
|
|
591
|
-
log("
|
|
591
|
+
//log("Hello " + database)
|
|
592
592
|
if (database !== 'bbn') {
|
|
593
593
|
log("THERE SHOULD BE A DEBUGGER!!!!!!!");
|
|
594
594
|
debugger;
|
|
@@ -630,7 +630,7 @@ const db = {
|
|
|
630
630
|
return this._objects[database];
|
|
631
631
|
},
|
|
632
632
|
async add(database, name, structure) {
|
|
633
|
-
log("fn add " + name);
|
|
633
|
+
//log("fn add " + name);
|
|
634
634
|
if (!structure?.keys?.PRIMARY || !structure?.fields) {
|
|
635
635
|
log("Error on add", structure);
|
|
636
636
|
throw new Error(_('The database structure for %s is not valid (missing keys, fields, or primary key)', name));
|