mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 01:05:49 +01:00
refactoring consistency checks WIP
This commit is contained in:
@@ -57,6 +57,11 @@ async function getOption(name) {
|
||||
return await getEntity("SELECT * FROM options WHERE name = ?", [name]);
|
||||
}
|
||||
|
||||
/** @returns {Link|null} */
|
||||
async function getLink(linkId) {
|
||||
return await getEntity("SELECT * FROM links WHERE linkId = ?", [linkId]);
|
||||
}
|
||||
|
||||
async function updateEntity(entity) {
|
||||
const entityName = entity.constructor.entityName;
|
||||
const primaryKeyName = entity.constructor.primaryKeyName;
|
||||
@@ -119,6 +124,7 @@ module.exports = {
|
||||
getBranch,
|
||||
getAttribute,
|
||||
getOption,
|
||||
getLink,
|
||||
updateEntity,
|
||||
setEntityConstructor
|
||||
};
|
||||
Reference in New Issue
Block a user