getting rid of note complement WIP

This commit is contained in:
zadam
2023-05-05 16:37:39 +02:00
parent 9cdcbb3125
commit 5e1f81e53e
23 changed files with 163 additions and 90 deletions

View File

@@ -137,6 +137,15 @@ class Becca {
.map(row => new BAttachment(row));
}
/** @returns {BBlob|null} */
getBlob(blobId) {
const row = sql.getRow("SELECT *, LENGTH(content) AS contentLength " +
"FROM blob WHERE blobId = ?", [blobId]);
const BBlob = require("./entities/bblob"); // avoiding circular dependency problems
return row ? new BBlob(row) : null;
}
/** @returns {BOption|null} */
getOption(name) {
return this.options[name];
@@ -161,6 +170,8 @@ class Becca {
return this.getNoteRevision(entityId);
} else if (entityName === 'attachments') {
return this.getAttachment(entityId);
} else if (entityName === 'blobs') {
return this.getBlob(entityId);
}
const camelCaseEntityName = entityName.toLowerCase().replace(/(_[a-z])/g,