docs/Script API/classes/Backend_Script_API.BAttribute.html
Attribute is an abstract concept which has two real uses - label (key - value pair) and relation (representing named relationship between source and target note)
attributeIdblobId?dateCreated?dateModified?isInheritableisProtected?isSynced?namenoteIdpositiontypeutcDateCreatedutcDateModified?value
beccaisAffectingSubtreeisDeletednotetargetNotetargetNoteIdentityNamehashedPropertiesprimaryKeyName
_getContent_setContentbeforeSavingcreateClonegenerateHashgetDefinedNamegetDefinitiongetNotegetPojogetPojoToSavegetTargetNotegetUtcDateChangedhasStringContentinitisAutoLinkisDefinitionmarkAsDeletedmarkAsDeletedSimpleputEntityChangesaveupdateupdateFromRowvalidate
new BAttribute(row?: AttributeRow): BAttribute
Optionalrow: AttributeRowattributeId: string
OptionalblobIdblobId?: string
OptionaldateCreateddateCreated?: string
OptionaldateModifieddateModified?: string
isInheritable: boolean
OptionalisProtectedisProtected?: boolean
OptionalisSyncedisSynced?: boolean
name: string
noteId: string
position: number
type: AttributeType
utcDateCreated: string
OptionalutcDateModifiedutcDateModified?: string
value: string
Protectedbeccaget becca(): default
get isAffectingSubtree(): boolean
get isDeleted(): boolean
get note(): BNote
get targetNote(): undefined | BNote
get targetNoteId(): undefined | string
StaticentityNameget entityName(): string
StatichashedPropertiesget hashedProperties(): string[]
StaticprimaryKeyNameget primaryKeyName(): string
Protected_getContent_getContent(): string | Buffer<ArrayBufferLike>
Protected_setContent_setContent(content: string | Buffer<ArrayBufferLike>, opts?: ContentOpts): void
beforeSaving(opts?: SavingOpts): void
createClone(
type: AttributeType,
name: string,
value: string,
isInheritable?: boolean,
): BAttribute
OptionalisInheritable: booleangenerateHash(isDeleted?: boolean): string
OptionalisDeleted: booleangetDefinedName(): string
getDefinition(): DefinitionObject
getNote(): BNote
getPojo(): {
attributeId: string;
isDeleted: boolean;
isInheritable: boolean;
name: string;
noteId: string;
position: number;
type: AttributeType;
utcDateModified: undefined
| string;
value: string;
}
ProtectedgetPojoToSavegetPojoToSave(): {}
getTargetNote(): null | BNote
getUtcDateChanged(): string
hasStringContent(): boolean
init(): void
isAutoLink(): boolean
isDefinition(): boolean
markAsDeleted(deleteId?: null | string): void
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use note.deleteNote() and 'branch.deleteBranch()` instead.
markAsDeletedSimple(): void
ProtectedputEntityChangeputEntityChange(isDeleted: boolean): void
save(opts?: {}): this
Saves entity - executes SQL, but doesn't commit the transaction on its own
Optionalopts: {}update(__namedParameters: any): BAttribute
updateFromRow(row: AttributeRow): void
validate(): void
Member Visibility
ThemeOSLightDark
Constructors constructor Properties attributeIdblobIddateCreateddateModifiedisInheritableisProtectedisSyncednamenoteIdpositiontypeutcDateCreatedutcDateModifiedvalue Accessors beccaisAffectingSubtreeisDeletednotetargetNotetargetNoteIdentityNamehashedPropertiesprimaryKeyName Methods _getContent_setContentbeforeSavingcreateClonegenerateHashgetDefinedNamegetDefinitiongetNotegetPojogetPojoToSavegetTargetNotegetUtcDateChangedhasStringContentinitisAutoLinkisDefinitionmarkAsDeletedmarkAsDeletedSimpleputEntityChangesaveupdateupdateFromRowvalidate