diff --git a/docs/backend_api/BNote.html b/docs/backend_api/BNote.html index 20d8bc7bc0..785bc82aa3 100644 --- a/docs/backend_api/BNote.html +++ b/docs/backend_api/BNote.html @@ -1588,7 +1588,7 @@
Parameters:
Source:
@@ -1835,7 +1835,7 @@
Parameters:
Source:
@@ -2081,7 +2081,7 @@
Parameters:
Source:
@@ -2316,7 +2316,7 @@
Parameters:
Source:
@@ -2432,7 +2432,7 @@

Source:
@@ -2653,7 +2653,7 @@
Parameters:
Source:
@@ -2848,7 +2848,7 @@

getAll
Source:
@@ -4207,7 +4207,7 @@

Parameters:
Source:
@@ -4386,7 +4386,7 @@
Parameters:
Source:
@@ -9019,7 +9019,7 @@
Parameters:
Source:
@@ -11329,7 +11329,7 @@
Parameters:
Source:
@@ -11435,7 +11435,7 @@

isH
Source:
@@ -12675,7 +12675,7 @@

Parameters:
Source:
@@ -12855,7 +12855,7 @@
Parameters:
Source:
@@ -13035,7 +13035,7 @@
Parameters:
Source:
@@ -13288,7 +13288,7 @@
Parameters:
Source:
@@ -13390,7 +13390,7 @@

saveRevis
Source:
@@ -13622,7 +13622,7 @@

Parameters:
Source:
@@ -14081,7 +14081,7 @@
Parameters:
Source:
@@ -14241,7 +14241,7 @@
Parameters:
Source:
@@ -14483,7 +14483,7 @@
Parameters:
Source:
@@ -14694,7 +14694,7 @@
Parameters:
Source:
@@ -14905,7 +14905,7 @@
Parameters:
Source:
diff --git a/docs/backend_api/BackendScriptApi.html b/docs/backend_api/BackendScriptApi.html index 5618ff0d92..8aebca7675 100644 --- a/docs/backend_api/BackendScriptApi.html +++ b/docs/backend_api/BackendScriptApi.html @@ -94,7 +94,7 @@

new B
Source:
@@ -240,7 +240,7 @@

Properties:
Source:
@@ -314,7 +314,7 @@
Type:
Source:
@@ -386,7 +386,7 @@
Type:
Source:
@@ -458,7 +458,7 @@
Type:
Source:
@@ -530,7 +530,7 @@
Type:
Source:
@@ -602,7 +602,7 @@
Type:
Source:
@@ -674,7 +674,7 @@
Type:
Source:
@@ -746,7 +746,7 @@
Type:
Source:
@@ -774,6 +774,161 @@

Methods

+

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 @@
Parameters:
Source:
@@ -1441,7 +1596,7 @@
Properties
Source:
@@ -2075,7 +2230,7 @@
Properties
Source:
@@ -2602,7 +2757,7 @@
Properties
Source:
@@ -2803,7 +2958,7 @@
Parameters:
Source:
@@ -2985,7 +3140,7 @@
Parameters:
Source:
@@ -3186,7 +3341,7 @@
Parameters:
Source:
@@ -3337,7 +3492,7 @@
Parameters:
Source:
@@ -3538,7 +3693,7 @@
Parameters:
Source:
@@ -3640,7 +3795,7 @@

getAppInfo<
Source:
@@ -3798,7 +3953,7 @@

Parameters:
Source:
@@ -3952,7 +4107,7 @@
Parameters:
Source:
@@ -4106,7 +4261,7 @@
Parameters:
Source:
@@ -4260,7 +4415,7 @@
Parameters:
Source:
@@ -4461,7 +4616,7 @@
Parameters:
Source:
@@ -4615,7 +4770,7 @@
Parameters:
Source:
@@ -4720,7 +4875,7 @@

getEtap
Source:
@@ -4827,7 +4982,7 @@

getIns
Source:
@@ -5028,7 +5183,7 @@

Parameters:
Source:
@@ -5182,7 +5337,7 @@
Parameters:
Source:
@@ -5383,7 +5538,7 @@
Parameters:
Source:
@@ -5584,7 +5739,7 @@
Parameters:
Source:
@@ -5735,7 +5890,7 @@
Parameters:
Source:
@@ -5840,7 +5995,7 @@

getOptions<
Source:
@@ -5991,7 +6146,7 @@

Parameters:
Source:
@@ -6100,7 +6255,7 @@

ge
Source:
@@ -6270,7 +6425,7 @@

Parameters:
Source:
@@ -6573,7 +6728,7 @@
Properties
Source:
@@ -6774,7 +6929,7 @@
Parameters:
Source:
@@ -6927,7 +7082,7 @@
Parameters:
Source:
@@ -7082,7 +7237,7 @@
Parameters:
Source:
@@ -7267,7 +7422,7 @@
Parameters:
Source:
@@ -7431,7 +7586,7 @@
Parameters:
Source:
@@ -7634,7 +7789,7 @@
Parameters:
Source:
@@ -7836,7 +7991,7 @@
Parameters:
Source:
@@ -8045,7 +8200,7 @@
Parameters:
Source:
@@ -8391,7 +8546,7 @@
Properties
Source:
@@ -8615,7 +8770,7 @@
Parameters:
Source:
@@ -8771,7 +8926,7 @@
Parameters:
Source:
@@ -8926,7 +9081,7 @@
Parameters:
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 aeff23d230..d07a48e8f3 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 @@

Source: becca/entities/abstract_becca_entity.js

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 @@

Source: becca/entities/abstract_becca_entity.js

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 5ce1f70df2..d3eaa43cef 100644 --- a/docs/backend_api/global.html +++ b/docs/backend_api/global.html @@ -152,7 +152,7 @@
Type:
Source:
@@ -612,7 +612,7 @@
Type:
Source:
diff --git a/docs/backend_api/services_backend_script_api.js.html b/docs/backend_api/services_backend_script_api.js.html index dedaa6f88d..94f28a43c3 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 @@

Source: services/backend_script_api.js

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 @@

Source: services/backend_script_api.js

*/ 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 2145b836c9..09040de56b 100644 --- a/docs/frontend_api/FNote.html +++ b/docs/frontend_api/FNote.html @@ -1172,7 +1172,7 @@

getAll
Source:
@@ -1278,7 +1278,7 @@

(async) Source:
@@ -1380,7 +1380,7 @@

(async) Source:
@@ -1482,7 +1482,7 @@

(async)
Source:
@@ -1656,7 +1656,7 @@
Parameters:
Source:
@@ -1834,7 +1834,7 @@
Parameters:
Source:
@@ -2034,7 +2034,7 @@
Parameters:
Source:
@@ -2213,7 +2213,7 @@
Parameters:
Source:
@@ -2392,7 +2392,7 @@
Parameters:
Source:
@@ -2498,7 +2498,7 @@

(async) getBlo
Source:
@@ -2602,7 +2602,7 @@

getBranch
Source:
@@ -2706,7 +2706,7 @@

getBranche
Source:
@@ -2808,7 +2808,7 @@

getCh
Source:
@@ -2910,7 +2910,7 @@

getChi
Source:
@@ -3012,7 +3012,7 @@

(async)
Source:
@@ -3163,7 +3163,7 @@

Parameters:
Source:
@@ -3318,7 +3318,7 @@
Parameters:
Source:
@@ -3485,7 +3485,7 @@
Parameters:
Source:
@@ -3595,7 +3595,7 @@

(async) ge
Source:
@@ -3699,7 +3699,7 @@

(async) Source:
@@ -3801,7 +3801,7 @@

Source:
@@ -3975,7 +3975,7 @@
Parameters:
Source:
@@ -4153,7 +4153,7 @@
Parameters:
Source:
@@ -4353,7 +4353,7 @@
Parameters:
Source:
@@ -4508,7 +4508,7 @@
Parameters:
Source:
@@ -4663,7 +4663,7 @@
Parameters:
Source:
@@ -4830,7 +4830,7 @@
Parameters:
Source:
@@ -4985,7 +4985,7 @@
Parameters:
Source:
@@ -5140,7 +5140,7 @@
Parameters:
Source:
@@ -5307,7 +5307,7 @@
Parameters:
Source:
@@ -5413,7 +5413,7 @@

get
Source:
@@ -5515,7 +5515,7 @@

getP
Source:
@@ -5617,7 +5617,7 @@

getPa
Source:
@@ -5719,7 +5719,7 @@

getPare
Source:
@@ -5870,7 +5870,7 @@

Parameters:
Source:
@@ -6025,7 +6025,7 @@
Parameters:
Source:
@@ -6195,7 +6195,7 @@
Parameters:
Source:
@@ -6346,7 +6346,7 @@
Parameters:
Source:
@@ -6513,7 +6513,7 @@
Parameters:
Source:
@@ -6619,7 +6619,7 @@

getScript
Source:
@@ -6797,7 +6797,7 @@

Parameters:
Source:
@@ -6903,7 +6903,7 @@

Source:
@@ -7009,7 +7009,7 @@

get
Source:
@@ -7183,7 +7183,7 @@

Parameters:
Source:
@@ -7289,7 +7289,7 @@

hasChildre
Source:
@@ -7440,7 +7440,7 @@

Parameters:
Source:
@@ -7618,7 +7618,7 @@
Parameters:
Source:
@@ -7773,7 +7773,7 @@
Parameters:
Source:
@@ -7928,7 +7928,7 @@
Parameters:
Source:
@@ -8083,7 +8083,7 @@
Parameters:
Source:
@@ -8191,7 +8191,7 @@

Source:
@@ -8275,7 +8275,7 @@

isH
Source:
@@ -8369,7 +8369,7 @@

isHtmlSource:
@@ -8475,7 +8475,7 @@

isJavaScr
Source:
@@ -8581,7 +8581,7 @@

isJsonSource:
@@ -8732,7 +8732,7 @@
Parameters:
Source:
diff --git a/docs/frontend_api/entities_fnote.js.html b/docs/frontend_api/entities_fnote.js.html index fcf02c5219..617d42f102 100644 --- a/docs/frontend_api/entities_fnote.js.html +++ b/docs/frontend_api/entities_fnote.js.html @@ -121,6 +121,9 @@

Source: entities/fnote.js

* @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) {