Trilium Backend API
    Preparing search index...

    Interface AbstractBeccaEntity<T>Abstract

    Base class for all backend entities.

    interface AbstractBeccaEntity<T extends AbstractBeccaEntity<T>> {
        blobId?: string;
        dateCreated?: string;
        dateModified?: string;
        isProtected?: boolean;
        isSynced?: boolean;
        utcDateCreated: string;
        utcDateModified?: string;
        get becca(): default;
        get isDeleted(): boolean;
        _getContent(): string | Buffer<ArrayBufferLike>;
        _setContent(
            content: string | Buffer<ArrayBufferLike>,
            opts?: ContentOpts,
        ): void;
        beforeSaving(opts?: {}): void;
        generateHash(isDeleted?: boolean): string;
        getPojo(): {};
        getPojoToSave(): {};
        getUtcDateChanged(): string;
        hasStringContent(): boolean;
        init(): void;
        markAsDeleted(deleteId?: string): void;
        markAsDeletedSimple(): void;
        putEntityChange(isDeleted: boolean): void;
        save(opts?: {}): this;
        updateFromRow(row: unknown): void;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    blobId?: string
    dateCreated?: string
    dateModified?: string
    isProtected?: boolean
    isSynced?: boolean
    utcDateCreated: string
    utcDateModified?: string

    Accessors

    • get becca(): default

      Returns default

    • get isDeleted(): boolean

      Returns boolean

    Methods

    • Returns string | Buffer<ArrayBufferLike>

    • Parameters

      • Optionalopts: {}

      Returns void

    • Parameters

      • OptionalisDeleted: boolean

      Returns string

    • Returns {}

    • Returns {}

    • Returns string

    • Returns boolean

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

      Parameters

      • OptionaldeleteId: string

      Returns void

    • 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

      • row: unknown

      Returns void