modified backup db remove functions to not delete data but keep just id, vector clock and timestamp
This commit is contained in:
parent
44d9327798
commit
2f9126942b
@ -20013,7 +20013,8 @@
|
||||
};
|
||||
|
||||
request.onsuccess = function (event) {
|
||||
if (request.result) {
|
||||
if (request.result
|
||||
&& typeof request.result.is_deletable == "undefined") {
|
||||
resolve(request.result);
|
||||
} else {
|
||||
resolve();
|
||||
@ -20034,7 +20035,8 @@
|
||||
objectStore.openCursor().onsuccess = function (event) {
|
||||
let cursor = event.target.result;
|
||||
if (cursor) {
|
||||
if (cursor.value[index] == indexValue) {
|
||||
if (cursor.value[index] == indexValue
|
||||
&& typeof cursor.value.is_deletable == "undefined") {
|
||||
response.push(cursor.value);
|
||||
}
|
||||
cursor.continue();
|
||||
@ -20055,7 +20057,7 @@
|
||||
var objectStore = db.transaction(tablename).objectStore(tablename);
|
||||
objectStore.openCursor().onsuccess = function (event) {
|
||||
let cursor = event.target.result;
|
||||
if (cursor) {
|
||||
if (cursor && typeof cursor.value.is_deletable == "undefined") {
|
||||
response.push(cursor.value);
|
||||
cursor.continue();
|
||||
} else {
|
||||
@ -20369,7 +20371,8 @@
|
||||
};
|
||||
|
||||
this.request.onsuccess = function (event) {
|
||||
if (parent_request.result) {
|
||||
if (parent_request.result
|
||||
&& typeof parent_request.result.is_deletable == "undefined") {
|
||||
resolve(parent_request.result);
|
||||
} else {
|
||||
resolve();
|
||||
@ -20390,7 +20393,8 @@
|
||||
objectStore.openCursor().onsuccess = function (event) {
|
||||
let cursor = event.target.result;
|
||||
if (cursor) {
|
||||
if (cursor.value[index] == indexValue) {
|
||||
if (cursor.value[index] == indexValue
|
||||
&& typeof cursor.value.is_deletable == "undefined") {
|
||||
response.push(cursor.value);
|
||||
}
|
||||
cursor.continue();
|
||||
@ -20407,7 +20411,7 @@
|
||||
var objectStore = this.db.transaction(tablename).objectStore(tablename);
|
||||
objectStore.openCursor().onsuccess = function (event) {
|
||||
let cursor = event.target.result;
|
||||
if (cursor) {
|
||||
if (cursor && typeof cursor.value.is_deletable == "undefined") {
|
||||
response.push(cursor.value);
|
||||
cursor.continue();
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user