Back to Trilium

Class BRecentNote

docs/Script API/classes/Backend_Script_API.BRecentNote.html

0.102.25.6 KB
Original Source

Class BRecentNote

RecentNote represents recently visited note.

Hierarchy (View Summary)

Index

Constructors

constructor

Properties

blobId?dateCreated?dateModified?isProtected?isSynced?noteIdnotePathutcDateCreatedutcDateModified?

Accessors

beccaisDeletedentityNamehashedPropertiesprimaryKeyName

Methods

_getContent_setContentbeforeSavinggenerateHashgetPojogetPojoToSavegetUtcDateChangedhasStringContentinitmarkAsDeletedmarkAsDeletedSimpleputEntityChangesaveupdateFromRow

Constructors

constructor

new BRecentNote(row: RecentNoteRow): BRecentNote

Parameters

Returns BRecentNote

Properties

OptionalblobId

blobId?: string

OptionaldateCreated

dateCreated?: string

OptionaldateModified

dateModified?: string

OptionalisProtected

isProtected?: boolean

OptionalisSynced

isSynced?: boolean

noteId

noteId: string

notePath

notePath: string

utcDateCreated

utcDateCreated: string

OptionalutcDateModified

utcDateModified?: string

Accessors

Protectedbecca

get becca(): default

Returns default

isDeleted

get isDeleted(): boolean

Returns boolean

StaticentityName

get entityName(): string

Returns string

StatichashedProperties

get hashedProperties(): string[]

Returns string[]

StaticprimaryKeyName

get primaryKeyName(): string

Returns string

Methods

Protected_getContent

_getContent(): string | Buffer<ArrayBufferLike>

Returns string | Buffer<ArrayBufferLike>

Protected_setContent

_setContent(content: string | Buffer<ArrayBufferLike>, opts?: ContentOpts): void

Parameters

Returns void

ProtectedbeforeSaving

beforeSaving(opts?: {}): void

Parameters

  • Optionalopts: {}

Returns void

generateHash

generateHash(isDeleted?: boolean): string

Parameters

  • OptionalisDeleted: boolean

Returns string

getPojo

getPojo(): { noteId: string; notePath: string; utcDateCreated: string }

Returns { noteId: string; notePath: string; utcDateCreated: string }

ProtectedgetPojoToSave

getPojoToSave(): {}

Returns {}

getUtcDateChanged

getUtcDateChanged(): string

Returns string

hasStringContent

hasStringContent(): boolean

Returns boolean

init

init(): void

Returns void

markAsDeleted

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.

Parameters

  • deleteId: null | string = null

Returns void

markAsDeletedSimple

markAsDeletedSimple(): void

Returns void

ProtectedputEntityChange

putEntityChange(isDeleted: boolean): void

Parameters

  • isDeleted: boolean

Returns void

save

save(opts?: {}): this

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

Parameters

  • Optionalopts: {}

Returns this

updateFromRow

updateFromRow(row: RecentNoteRow): void

Parameters

Returns void

Settings

Member Visibility

  • Protected
  • Inherited
  • External

ThemeOSLightDark

On This Page

Constructors constructor Properties blobIddateCreateddateModifiedisProtectedisSyncednoteIdnotePathutcDateCreatedutcDateModified Accessors beccaisDeletedentityNamehashedPropertiesprimaryKeyName Methods _getContent_setContentbeforeSavinggenerateHashgetPojogetPojoToSavegetUtcDateChangedhasStringContentinitmarkAsDeletedmarkAsDeletedSimpleputEntityChangesaveupdateFromRow