mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
added hash columns for faster sync check calculation
This commit is contained in:
@@ -14,6 +14,14 @@ class Entity {
|
||||
if (!this[this.constructor.primaryKeyName]) {
|
||||
this[this.constructor.primaryKeyName] = utils.newEntityId();
|
||||
}
|
||||
|
||||
let contentToHash = "";
|
||||
|
||||
for (const propertyName of this.constructor.syncedProperties) {
|
||||
contentToHash += "|" + this[propertyName];
|
||||
}
|
||||
|
||||
this["hash"] = utils.hash(contentToHash).substr(0, 10);
|
||||
}
|
||||
|
||||
async save() {
|
||||
|
||||
Reference in New Issue
Block a user