diff --git a/docs/backend_api/BNote.html b/docs/backend_api/BNote.html index 20d8bc7bc..785bc82aa 100644 --- a/docs/backend_api/BNote.html +++ b/docs/backend_api/BNote.html @@ -1588,7 +1588,7 @@ See addLabel, addRelation for more specific methods.
Source:
@@ -1835,7 +1835,7 @@ See addLabel, addRelation for more specific methods.
Source:
@@ -2081,7 +2081,7 @@ returned.
Source:
@@ -2316,7 +2316,7 @@ returned.
Source:
@@ -2432,7 +2432,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -2653,7 +2653,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -2848,7 +2848,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -4207,7 +4207,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -4386,7 +4386,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -9019,7 +9019,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -11329,7 +11329,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -11435,7 +11435,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -12675,7 +12675,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -12855,7 +12855,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -13035,7 +13035,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -13288,7 +13288,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -13390,7 +13390,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -13622,7 +13622,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -14081,7 +14081,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -14241,7 +14241,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -14483,7 +14483,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -14694,7 +14694,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -14905,7 +14905,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
diff --git a/docs/backend_api/BackendScriptApi.html b/docs/backend_api/BackendScriptApi.html index 5618ff0d9..8aebca767 100644 --- a/docs/backend_api/BackendScriptApi.html +++ b/docs/backend_api/BackendScriptApi.html @@ -94,7 +94,7 @@ available in the JS backend notes. You can use e.g. api.log(api.startNote.
Source:
@@ -240,7 +240,7 @@ available in the JS backend notes. You can use e.g. api.log(api.startNote.
Source:
@@ -314,7 +314,7 @@ available in the JS backend notes. You can use e.g. api.log(api.startNote.
Source:
@@ -386,7 +386,7 @@ available in the JS backend notes. You can use e.g. api.log(api.startNote.
Source:
@@ -458,7 +458,7 @@ available in the JS backend notes. You can use e.g. api.log(api.startNote.
Source:
@@ -530,7 +530,7 @@ available in the JS backend notes. You can use e.g. api.log(api.startNote.
Source:
@@ -602,7 +602,7 @@ available in the JS backend notes. You can use e.g. api.log(api.startNote.
Source:
@@ -674,7 +674,7 @@ available in the JS backend notes. You can use e.g. api.log(api.startNote.
Source:
@@ -746,7 +746,7 @@ available in the JS backend notes. You can use e.g. api.log(api.startNote.
Source:
@@ -774,6 +774,161 @@ available in the JS backend notes. You can use e.g. api.log(api.startNote. +

backupNow(backupName) → {Promise}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
backupName + + +string + + + + If the backupName is e.g. "now", then the backup will be written to "backup-now.db" file
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ - resolves once the backup is finished +
+ + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + + + + +

createDataNote(parentNoteId, title, content) → {Object}

@@ -922,7 +1077,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -1441,7 +1596,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -2075,7 +2230,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -2602,7 +2757,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -2803,7 +2958,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -2985,7 +3140,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -3186,7 +3341,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -3337,7 +3492,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -3538,7 +3693,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -3640,7 +3795,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -3798,7 +3953,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -3952,7 +4107,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -4106,7 +4261,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -4260,7 +4415,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -4461,7 +4616,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -4615,7 +4770,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -4720,7 +4875,7 @@ JSON MIME type. See also createNewNote() for more options.
Source:
@@ -4827,7 +4982,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -5028,7 +5183,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -5182,7 +5337,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -5383,7 +5538,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -5584,7 +5739,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -5735,7 +5890,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -5840,7 +5995,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -5991,7 +6146,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -6100,7 +6255,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -6270,7 +6425,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -6573,7 +6728,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -6774,7 +6929,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -6927,7 +7082,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -7082,7 +7237,7 @@ if some action needs to happen on only one specific instance.
Source:
@@ -7267,7 +7422,7 @@ instances execute the given function.
Source:
@@ -7431,7 +7586,7 @@ you need to make some DB changes, you need to surround your call with api.transa
Source:
@@ -7634,7 +7789,7 @@ you need to make some DB changes, you need to surround your call with api.transa
Source:
@@ -7836,7 +7991,7 @@ you need to make some DB changes, you need to surround your call with api.transa
Source:
@@ -8045,7 +8200,7 @@ This method looks similar to toggleNoteInParent() but differs because we're look
Source:
@@ -8391,7 +8546,7 @@ This method looks similar to toggleNoteInParent() but differs because we're look
Source:
@@ -8615,7 +8770,7 @@ This method looks similar to toggleNoteInParent() but differs because we're look
Source:
@@ -8771,7 +8926,7 @@ exists, then we'll use that transaction.
Source:
@@ -8926,7 +9081,7 @@ exists, then we'll use that transaction.
Source:
diff --git a/docs/backend_api/becca_entities_abstract_becca_entity.js.html b/docs/backend_api/becca_entities_abstract_becca_entity.js.html index aeff23d23..d07a48e8f 100644 --- a/docs/backend_api/becca_entities_abstract_becca_entity.js.html +++ b/docs/backend_api/becca_entities_abstract_becca_entity.js.html @@ -208,7 +208,7 @@ class AbstractBeccaEntity { sql.execute("DELETE FROM blobs WHERE blobId = ?", [oldBlobId]); // blobs are not marked as erased in entity_changes, they are just purged completely - // this is because technically every keystroke can create a new blob and there would be just too many + // this is because technically every keystroke can create a new blob, and there would be just too many sql.execute("DELETE FROM entity_changes WHERE entityName = 'blobs' AND entityId = ?", [oldBlobId]); } @@ -258,7 +258,7 @@ class AbstractBeccaEntity { isErased: false, utcDateChanged: pojo.utcDateModified, isSynced: true, - // overriding componentId will cause frontend to think the change is coming from a different component + // overriding componentId will cause the frontend to think the change is coming from a different component // and thus reload componentId: opts.forceFrontendReload ? utils.randomString(10) : null }); diff --git a/docs/backend_api/global.html b/docs/backend_api/global.html index 5ce1f70df..d3eaa43ce 100644 --- a/docs/backend_api/global.html +++ b/docs/backend_api/global.html @@ -152,7 +152,7 @@
Source:
@@ -612,7 +612,7 @@ not for direct use.
Source:
diff --git a/docs/backend_api/services_backend_script_api.js.html b/docs/backend_api/services_backend_script_api.js.html index dedaa6f88..94f28a43c 100644 --- a/docs/backend_api/services_backend_script_api.js.html +++ b/docs/backend_api/services_backend_script_api.js.html @@ -47,7 +47,8 @@ const SpacedUpdate = require("./spaced_update"); const specialNotesService = require("./special_notes"); const branchService = require("./branches"); const exportService = require("./export/zip"); -const syncMutex = require("./sync_mutex.js"); +const syncMutex = require("./sync_mutex"); +const backupService = require("./backup"); const optionsService = require("./options"); @@ -691,6 +692,13 @@ function BackendScriptApi(currentNote, apiParams) { */ this.runOutsideOfSync = syncMutex.doExclusively; + /** + * @method + * @param {string} backupName - If the backupName is e.g. "now", then the backup will be written to "backup-now.db" file + * @returns {Promise} - resolves once the backup is finished + */ + this.backupNow = backupService.backupNow; + /** * This object contains "at your risk" and "no BC guarantees" objects for advanced use cases. * diff --git a/docs/frontend_api/FNote.html b/docs/frontend_api/FNote.html index 2145b836c..09040de56 100644 --- a/docs/frontend_api/FNote.html +++ b/docs/frontend_api/FNote.html @@ -1172,7 +1172,7 @@
Source:
@@ -1278,7 +1278,7 @@
Source:
@@ -1380,7 +1380,7 @@
Source:
@@ -1482,7 +1482,7 @@
Source:
@@ -1656,7 +1656,7 @@
Source:
@@ -1834,7 +1834,7 @@
Source:
@@ -2034,7 +2034,7 @@
Source:
@@ -2213,7 +2213,7 @@
Source:
@@ -2392,7 +2392,7 @@
Source:
@@ -2498,7 +2498,7 @@
Source:
@@ -2602,7 +2602,7 @@
Source:
@@ -2706,7 +2706,7 @@
Source:
@@ -2808,7 +2808,7 @@
Source:
@@ -2910,7 +2910,7 @@
Source:
@@ -3012,7 +3012,7 @@
Source:
@@ -3163,7 +3163,7 @@
Source:
@@ -3318,7 +3318,7 @@
Source:
@@ -3485,7 +3485,7 @@
Source:
@@ -3595,7 +3595,7 @@
Source:
@@ -3699,7 +3699,7 @@
Source:
@@ -3801,7 +3801,7 @@
Source:
@@ -3975,7 +3975,7 @@
Source:
@@ -4153,7 +4153,7 @@
Source:
@@ -4353,7 +4353,7 @@
Source:
@@ -4508,7 +4508,7 @@
Source:
@@ -4663,7 +4663,7 @@
Source:
@@ -4830,7 +4830,7 @@
Source:
@@ -4985,7 +4985,7 @@
Source:
@@ -5140,7 +5140,7 @@
Source:
@@ -5307,7 +5307,7 @@
Source:
@@ -5413,7 +5413,7 @@
Source:
@@ -5515,7 +5515,7 @@
Source:
@@ -5617,7 +5617,7 @@
Source:
@@ -5719,7 +5719,7 @@
Source:
@@ -5870,7 +5870,7 @@
Source:
@@ -6025,7 +6025,7 @@
Source:
@@ -6195,7 +6195,7 @@
Source:
@@ -6346,7 +6346,7 @@
Source:
@@ -6513,7 +6513,7 @@
Source:
@@ -6619,7 +6619,7 @@
Source:
@@ -6797,7 +6797,7 @@
Source:
@@ -6903,7 +6903,7 @@
Source:
@@ -7009,7 +7009,7 @@
Source:
@@ -7183,7 +7183,7 @@
Source:
@@ -7289,7 +7289,7 @@
Source:
@@ -7440,7 +7440,7 @@
Source:
@@ -7618,7 +7618,7 @@
Source:
@@ -7773,7 +7773,7 @@
Source:
@@ -7928,7 +7928,7 @@
Source:
@@ -8083,7 +8083,7 @@
Source:
@@ -8191,7 +8191,7 @@
Source:
@@ -8275,7 +8275,7 @@
Source:
@@ -8369,7 +8369,7 @@
Source:
@@ -8475,7 +8475,7 @@
Source:
@@ -8581,7 +8581,7 @@
Source:
@@ -8732,7 +8732,7 @@
Source:
diff --git a/docs/frontend_api/entities_fnote.js.html b/docs/frontend_api/entities_fnote.js.html index fcf02c521..617d42f10 100644 --- a/docs/frontend_api/entities_fnote.js.html +++ b/docs/frontend_api/entities_fnote.js.html @@ -121,6 +121,9 @@ class FNote { * @type {string} */ this.mime = row.mime; + + // the main use case to keep this is to detect content change which should trigger refresh + this.blobId = row.blobId; } addParent(parentNoteId, branchId, sort = true) {