Optional
blobsize of the note content, attachment contents and revision contents in bytes
size of the note content, attachment contents in bytes
size of the content in bytes
Optional
dateOptional
dateset during the deletion operation, before it is completed (removed from becca completely).
Optional
isOptional
isnumber of note revisions for this note
Optional
utcProtected
beccaStatic
entityStatic
hashedStatic
primaryProtected
_getProtected
_setAdds a new attribute to this note. The attribute is saved and returned. See addLabel, addRelation for more specific methods.
attribute type (label / relation)
name of the attribute, not including the leading ~/#
value of the attribute - text for labels, target note ID for relations; optional.
Adds a new label to this note. The label attribute is saved and returned.
name of the label, not including the leading #
text value of the label; optional
Adds a new relation to this note. The relation attribute is saved and returned.
name of the relation, not including the leading ~
Some notes are eligible for conversion into an attachment of its parent, note must have these properties:
Currently, works only for image notes.
In the future, this functionality might get more generic and some of the requirements relaxed.
null if note is not eligible for conversion
attribute type (label, relation, etc.)
attribute name
attribute of the given type and name. If there are more such attributes, first is returned. Returns null if there's no such attribute belonging to this note.
Beware that the method must not create a copy of the array, but actually returns its internal array (for performance reasons)
Optional
type: string(optional) attribute type to filter
Optional
name: string(optional) attribute name to filter
all note's attributes, including inherited ones
Note content has quite special handling - it's not a separate entity, but a lazily loaded part of Note entity with its own sync. Reasons behind this hybrid design has been:
attribute belonging to this specific note (excludes inherited attributes)
This method can be significantly faster than the getAttribute()
Beware that the method must not create a copy of the array, but actually returns its internal array (for performance reasons)
(optional) attribute type to filter
(optional) attribute name to filter
(optional) attribute value to filter
note's "owned" attributes - excluding inherited ones
Protected
putchoose by which property we detect if to update an existing attachment. Supported values are either 'attachmentId' (default) or 'title'
Update's given attribute's value or creates it if it doesn't exist
attribute type (label, relation, etc.)
attribute name
Optional
value: stringattribute value (optional)
Based on enabled, the attribute is either set or removed.
attribute type ('relation', 'label' etc.)
toggle On or Off
attribute name
Optional
value: stringattribute value (optional)
Trilium's main entity, which can represent text note, image, code note, file attachment etc.