Trilium Backend API
    Preparing search index...

    Interface BAttribute

    Attribute is an abstract concept which has two real uses - label (key - value pair) and relation (representing named relationship between source and target note)

    interface BAttribute {
        attributeId: string;
        blobId?: string;
        dateCreated?: string;
        dateModified?: string;
        isInheritable: boolean;
        isProtected?: boolean;
        isSynced?: boolean;
        name: string;
        noteId: string;
        position: number;
        type: AttributeType;
        utcDateCreated: string;
        utcDateModified?: string;
        value: string;
        get becca(): default;
        get isAffectingSubtree(): boolean;
        get isDeleted(): boolean;
        get note(): BNote;
        get targetNote(): BNote;
        get targetNoteId(): string;
        _getContent(): string | Buffer<ArrayBufferLike>;
        _setContent(
            content: string | Buffer<ArrayBufferLike>,
            opts?: ContentOpts,
        ): void;
        beforeSaving(opts?: SavingOpts): void;
        createClone(
            type: AttributeType,
            name: string,
            value: string,
            isInheritable?: boolean,
        ): BAttribute;
        generateHash(isDeleted?: boolean): string;
        getDefinedName(): string;
        getDefinition(): DefinitionObject;
        getNote(): BNote;
        getPojo(): {
            attributeId: string;
            isDeleted: boolean;
            isInheritable: boolean;
            name: string;
            noteId: string;
            position: number;
            type: AttributeType;
            utcDateModified: string;
            value: string;
        };
        getPojoToSave(): {};
        getTargetNote(): BNote;
        getUtcDateChanged(): string;
        hasStringContent(): boolean;
        init(): void;
        isAutoLink(): boolean;
        isDefinition(): boolean;
        markAsDeleted(deleteId?: string): void;
        markAsDeletedSimple(): void;
        putEntityChange(isDeleted: boolean): void;
        save(opts?: {}): this;
        update(__namedParameters: any): this;
        updateFromRow(row: AttributeRow): void;
        validate(): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    attributeId: string
    blobId?: string
    dateCreated?: string
    dateModified?: string
    isInheritable: boolean
    isProtected?: boolean
    isSynced?: boolean
    name: string
    noteId: string
    position: number
    utcDateCreated: string
    utcDateModified?: string
    value: string

    Accessors

    • get becca(): default

      Returns default

    • get isAffectingSubtree(): boolean

      Returns boolean

    • get isDeleted(): boolean

      Returns boolean

    • get note(): BNote

      Returns BNote

    • get targetNote(): BNote

      Returns BNote

    • get targetNoteId(): string

      Returns string

    Methods

    • Parameters

      • type: AttributeType
      • name: string
      • value: string
      • OptionalisInheritable: boolean

      Returns BAttribute

    • Parameters

      • OptionalisDeleted: boolean

      Returns string

    • Returns string

    • Returns BNote

    • Returns {
          attributeId: string;
          isDeleted: boolean;
          isInheritable: boolean;
          name: string;
          noteId: string;
          position: number;
          type: AttributeType;
          utcDateModified: string;
          value: string;
      }

    • Returns BNote

    • Returns void

    • Returns boolean

    • Returns boolean

    • 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.

      Parameters

      • OptionaldeleteId: string

      Returns void

    • Parameters

      • isDeleted: boolean

      Returns void

    • Saves entity - executes SQL, but doesn't commit the transaction on its own

      Parameters

      • Optionalopts: {}

      Returns this

    • Parameters

      • __namedParameters: any

      Returns this

    • Returns void