From 02ce82eaf5133c671797ba6b3890ff10358a8d84 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 11 Dec 2024 18:47:19 +0200 Subject: [PATCH] chore(backend-docs): solve a few warnings --- ...ntities_abstract_becca_entity.default.html | 8 +- .../becca_entities_battachment.default.html | 14 +- .../becca_entities_battribute.default.html | 8 +- .../classes/becca_entities_bblob.default.html | 8 +- .../becca_entities_bbranch.default.html | 14 +- .../becca_entities_betapi_token.default.html | 8 +- .../classes/becca_entities_bnote.default.html | 144 +++++++++--------- .../becca_entities_boption.default.html | 8 +- .../becca_entities_brecent_note.default.html | 8 +- .../becca_entities_brevision.default.html | 16 +- .../becca_entities_rows.AttachmentRow.html | 4 +- .../becca_entities_rows.AttributeRow.html | 4 +- .../becca_entities_rows.BlobRow.html | 4 +- .../becca_entities_rows.BranchRow.html | 4 +- .../becca_entities_rows.EtapiTokenRow.html | 4 +- .../becca_entities_rows.NoteRow.html | 4 +- .../becca_entities_rows.OptionRow.html | 8 +- .../becca_entities_rows.RecentNoteRow.html | 4 +- .../becca_entities_rows.RevisionRow.html | 4 +- .../becca_entities_rows.AttributeType.html | 2 +- .../types/becca_entities_rows.NoteType.html | 2 +- ...ecca_entities_rows.ALLOWED_NOTE_TYPES.html | 2 +- .../services_backend_script_api.default.html | 2 +- .../variables/services_sql.default.html | 12 +- src/services/sql.ts | 6 - 25 files changed, 148 insertions(+), 154 deletions(-) diff --git a/docs/backend_api/classes/becca_entities_abstract_becca_entity.default.html b/docs/backend_api/classes/becca_entities_abstract_becca_entity.default.html index 70ae1b216..4ae0766fe 100644 --- a/docs/backend_api/classes/becca_entities_abstract_becca_entity.default.html +++ b/docs/backend_api/classes/becca_entities_abstract_becca_entity.default.html @@ -1,5 +1,5 @@ default | trilium

Base class for all backend entities.

-

Type Parameters

Hierarchy (View Summary)

Constructors

Type Parameters

Hierarchy (View Summary)

Constructors

Properties

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

Accessors

Methods

  • Parameters

    • content: string | Buffer<ArrayBufferLike>
    • opts: ContentOpts = {}

    Returns void

  • Mark the entity as (soft) deleted. It will be completely erased later.

    +

Constructors

Properties

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

Accessors

Methods

  • Parameters

    • content: string | Buffer<ArrayBufferLike>
    • opts: ContentOpts = {}

    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

    • deleteId: null | string = null

    Returns void

+

Parameters

Returns void

diff --git a/docs/backend_api/classes/becca_entities_battachment.default.html b/docs/backend_api/classes/becca_entities_battachment.default.html index 382811e3c..f4ea26a88 100644 --- a/docs/backend_api/classes/becca_entities_battachment.default.html +++ b/docs/backend_api/classes/becca_entities_battachment.default.html @@ -1,6 +1,6 @@ default | trilium

Attachment represent data related/attached to the note. Conceptually similar to attributes, but intended for larger amounts of data and generally not accessible to the user.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

attachmentId? blobId? contentLength? @@ -47,10 +47,10 @@ larger amounts of data and generally not accessible to the user.

save setContent updateFromRow -

Constructors

Properties

attachmentId?: string
blobId?: string
contentLength?: number

optionally added to the entity

-
dateCreated?: string
dateModified?: string
isDecrypted?: boolean
isProtected?: boolean
isSynced?: boolean
mime: string
noteId?: number
ownerId: string

either noteId or revisionId to which this attachment belongs

-
position?: number
role: string
title: string
type?: "file" | "image"
utcDateCreated: string
utcDateModified?: string
utcDateScheduledForErasureSince?: null | string

Accessors

Methods

  • Returns {
        attachmentId: undefined | string;
        blobId: undefined | string;
        contentLength: undefined | number;
        dateModified: undefined | string;
        isDeleted: boolean;
        isProtected: boolean;
        mime: string;
        ownerId: string;
        position: undefined | number;
        role: string;
        title: undefined | string;
        utcDateModified: undefined | string;
        utcDateScheduledForErasureSince: undefined | null | string;
    }

  • Returns {
        attachmentId: undefined | string;
        blobId: undefined | string;
        contentLength: undefined | number;
        dateModified: undefined | string;
        isDeleted: boolean;
        isProtected: boolean;
        mime: string;
        ownerId: string;
        position: undefined | number;
        role: string;
        title: undefined | string;
        utcDateModified: undefined | string;
        utcDateScheduledForErasureSince: undefined | null | string;
    }

  • Mark the entity as (soft) deleted. It will be completely erased later.

    +

Constructors

Properties

attachmentId?: string
blobId?: string
contentLength?: number

optionally added to the entity

+
dateCreated?: string
dateModified?: string
isDecrypted?: boolean
isProtected?: boolean
isSynced?: boolean
mime: string
noteId?: number
ownerId: string

either noteId or revisionId to which this attachment belongs

+
position?: number
role: string
title: string
type?: "file" | "image"
utcDateCreated: string
utcDateModified?: string
utcDateScheduledForErasureSince?: null | string

Accessors

Methods

  • Returns {
        attachmentId: undefined | string;
        blobId: undefined | string;
        contentLength: undefined | number;
        dateModified: undefined | string;
        isDeleted: boolean;
        isProtected: boolean;
        mime: string;
        ownerId: string;
        position: undefined | number;
        role: string;
        title: undefined | string;
        utcDateModified: undefined | string;
        utcDateScheduledForErasureSince: undefined | null | string;
    }

  • Returns {
        attachmentId: undefined | string;
        blobId: undefined | string;
        contentLength: undefined | number;
        dateModified: undefined | string;
        isDeleted: boolean;
        isProtected: boolean;
        mime: string;
        ownerId: string;
        position: undefined | number;
        role: string;
        title: undefined | string;
        utcDateModified: undefined | string;
        utcDateScheduledForErasureSince: undefined | null | string;
    }

  • 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

  • Parameters

    • content: string | Buffer<ArrayBufferLike>
    • Optionalopts: ContentOpts

    Returns void

+

Parameters

Returns void

diff --git a/docs/backend_api/classes/becca_entities_battribute.default.html b/docs/backend_api/classes/becca_entities_battribute.default.html index a34359a10..f5d75b8f6 100644 --- a/docs/backend_api/classes/becca_entities_battribute.default.html +++ b/docs/backend_api/classes/becca_entities_battribute.default.html @@ -1,6 +1,6 @@ default | trilium

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

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

attributeId blobId? dateCreated? @@ -47,7 +47,7 @@ and relation (representing named relationship between source and target note)

update updateFromRow validate -

Constructors

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

Methods

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

  • Mark the entity as (soft) deleted. It will be completely erased later.

    +

Constructors

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

Methods

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

  • 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

+

Parameters

Returns void

diff --git a/docs/backend_api/classes/becca_entities_bblob.default.html b/docs/backend_api/classes/becca_entities_bblob.default.html index 2f692516b..beb757b33 100644 --- a/docs/backend_api/classes/becca_entities_bblob.default.html +++ b/docs/backend_api/classes/becca_entities_bblob.default.html @@ -1,5 +1,5 @@ default | trilium

Base class for all backend entities.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

Constructors

Properties

blobId?: string
content: string | Buffer<ArrayBufferLike>
contentLength: number
dateCreated?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
utcDateCreated: string
utcDateModified?: string

Accessors

Methods

  • Returns {
        blobId: undefined | string;
        content: null | string | Buffer<ArrayBufferLike>;
        contentLength: number;
        dateModified: undefined | string;
        utcDateModified: undefined | string;
    }

  • Mark the entity as (soft) deleted. It will be completely erased later.

    +

Constructors

Properties

blobId?: string
content: string | Buffer<ArrayBufferLike>
contentLength: number
dateCreated?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
utcDateCreated: string
utcDateModified?: string

Accessors

Methods

  • Returns {
        blobId: undefined | string;
        content: null | string | Buffer<ArrayBufferLike>;
        contentLength: number;
        dateModified: undefined | string;
        utcDateModified: undefined | string;
    }

  • 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

+

Parameters

Returns void

diff --git a/docs/backend_api/classes/becca_entities_bbranch.default.html b/docs/backend_api/classes/becca_entities_bbranch.default.html index 6f6aa797e..dedfb0639 100644 --- a/docs/backend_api/classes/becca_entities_bbranch.default.html +++ b/docs/backend_api/classes/becca_entities_bbranch.default.html @@ -2,7 +2,7 @@ parents.

Note that you should not rely on the branch's identity, since it can change easily with a note's move. Always check noteId instead.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

blobId? branchId? dateCreated? @@ -42,16 +42,16 @@ Always check noteId instead.

save update updateFromRow -

Constructors

Properties

blobId?: string
branchId?: string
dateCreated?: string
dateModified?: string
isExpanded: boolean
isProtected?: boolean
isSynced?: boolean
noteId: string
notePosition: number
parentNoteId: string
prefix: null | string
utcDateCreated: string
utcDateModified?: string

Accessors

  • get isWeak(): boolean
  • Branch is weak when its existence should not hinder deletion of its note. +

Constructors

Properties

blobId?: string
branchId?: string
dateCreated?: string
dateModified?: string
isExpanded: boolean
isProtected?: boolean
isSynced?: boolean
noteId: string
notePosition: number
parentNoteId: string
prefix: null | string
utcDateCreated: string
utcDateModified?: string

Accessors

  • get isWeak(): boolean
  • Branch is weak when its existence should not hinder deletion of its note. As a result, note with only weak branches should be immediately deleted. An example is shared or bookmarked clones - they are created automatically and exist for technical reasons, not as user-intended actions. From user perspective, they don't count as real clones and for the purpose of deletion should not act as a clone.

    -

    Returns boolean

Methods

  • Delete a branch. If this is a last note's branch, delete the note as well.

    +

    Returns boolean

Methods

  • Delete a branch. If this is a last note's branch, delete the note as well.

    Parameters

    • OptionaldeleteId: string

      optional delete identified

    • OptionaltaskContext: TaskContext

    Returns boolean

    true if note has been deleted, false otherwise

    -
  • Returns {
        branchId: undefined | string;
        isDeleted: boolean;
        isExpanded: boolean;
        noteId: string;
        notePosition: number;
        parentNoteId: string;
        prefix: null | string;
        utcDateModified: undefined | string;
    }

  • Mark the entity as (soft) deleted. It will be completely erased later.

    +
  • Returns {
        branchId: undefined | string;
        isDeleted: boolean;
        isExpanded: boolean;
        noteId: string;
        notePosition: number;
        parentNoteId: string;
        prefix: null | string;
        utcDateModified: undefined | string;
    }

  • 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

+

Parameters

Returns void

diff --git a/docs/backend_api/classes/becca_entities_betapi_token.default.html b/docs/backend_api/classes/becca_entities_betapi_token.default.html index 7811fc953..a82e30a78 100644 --- a/docs/backend_api/classes/becca_entities_betapi_token.default.html +++ b/docs/backend_api/classes/becca_entities_betapi_token.default.html @@ -6,7 +6,7 @@ Used by:

The format user is presented with is "_". This is also called "authToken" to distinguish it from tokenHash and token.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

blobId? dateCreated? dateModified? @@ -36,7 +36,7 @@ from tokenHash and token.

putEntityChange save updateFromRow -

Constructors

Properties

blobId?: string
dateCreated?: string
dateModified?: string
etapiTokenId?: string
isProtected?: boolean
isSynced?: boolean
name: string
tokenHash: string
utcDateCreated: string
utcDateModified?: string

Accessors

Methods

  • Returns {
        etapiTokenId: undefined | string;
        isDeleted: boolean;
        name: string;
        tokenHash: string;
        utcDateCreated: string;
        utcDateModified: undefined | string;
    }

  • Mark the entity as (soft) deleted. It will be completely erased later.

    +

Constructors

Properties

blobId?: string
dateCreated?: string
dateModified?: string
etapiTokenId?: string
isProtected?: boolean
isSynced?: boolean
name: string
tokenHash: string
utcDateCreated: string
utcDateModified?: string

Accessors

Methods

  • Returns {
        etapiTokenId: undefined | string;
        isDeleted: boolean;
        name: string;
        tokenHash: string;
        utcDateCreated: string;
        utcDateModified: undefined | string;
    }

  • 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

+

Parameters

Returns void

diff --git a/docs/backend_api/classes/becca_entities_bnote.default.html b/docs/backend_api/classes/becca_entities_bnote.default.html index 74e685829..7d34d4eba 100644 --- a/docs/backend_api/classes/becca_entities_bnote.default.html +++ b/docs/backend_api/classes/becca_entities_bnote.default.html @@ -1,5 +1,5 @@ default | trilium

Trilium's main entity, which can represent text note, image, code note, file attachment etc.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

Constructors

Properties

__flatTextCache: null | string
blobId?: string
children: default[]
contentAndAttachmentsAndRevisionsSize: null | number

size of the note content, attachment contents and revision contents in bytes

-
contentAndAttachmentsSize: null | number

size of the note content, attachment contents in bytes

-
contentSize: null | number

size of the content in bytes

-
dateCreated?: string
dateModified?: string
isBeingDeleted: boolean

set during the deletion operation, before it is completed (removed from becca completely).

-
isDecrypted: boolean
isProtected?: boolean
isSynced?: boolean
mime: string
noteId: string
ownedAttributes: default[]
parentBranches: default[]
parents: default[]
revisionCount: null | number

number of note revisions for this note

-
targetRelations: default[]
title: string
type:
    | "search"
    | "file"
    | "text"
    | "code"
    | "relationMap"
    | "render"
    | "book"
    | "mermaid"
    | "canvas"
    | "image"
    | "noteMap"
    | "launcher"
    | "doc"
    | "contentWidget"
    | "webView"
    | "mindMap"
utcDateCreated: string
utcDateModified?: string

Accessors

Methods

  • Parameters

    • Optionaltype: null | string
    • Optionalname: null | string

    Returns void

  • Adds a new attribute to this note. The attribute is saved and returned. +

Constructors

Properties

__flatTextCache: null | string
blobId?: string
children: default[]
contentAndAttachmentsAndRevisionsSize: null | number

size of the note content, attachment contents and revision contents in bytes

+
contentAndAttachmentsSize: null | number

size of the note content, attachment contents in bytes

+
contentSize: null | number

size of the content in bytes

+
dateCreated?: string
dateModified?: string
isBeingDeleted: boolean

set during the deletion operation, before it is completed (removed from becca completely).

+
isDecrypted: boolean
isProtected?: boolean
isSynced?: boolean
mime: string
noteId: string
ownedAttributes: default[]
parentBranches: default[]
parents: default[]
revisionCount: null | number

number of note revisions for this note

+
targetRelations: default[]
title: string
type:
    | "search"
    | "file"
    | "text"
    | "code"
    | "relationMap"
    | "render"
    | "book"
    | "mermaid"
    | "canvas"
    | "image"
    | "noteMap"
    | "launcher"
    | "doc"
    | "contentWidget"
    | "webView"
    | "mindMap"
utcDateCreated: string
utcDateModified?: string

Accessors

Methods

  • Parameters

    • Optionaltype: null | string
    • Optionalname: null | string

    Returns void

  • Adds a new attribute to this note. The attribute is saved and returned. See addLabel, addRelation for more specific methods.

    Parameters

    • type: AttributeType

      attribute type (label / relation)

    • name: string

      name of the attribute, not including the leading ~/#

    • value: string = ""

      value of the attribute - text for labels, target note ID for relations; optional.

      -
    • isInheritable: boolean = false
    • position: null | number = null

    Returns default

  • Adds a new label to this note. The label attribute is saved and returned.

    +
  • isInheritable: boolean = false
  • position: null | number = null

Returns default

  • Adds a new label to this note. The label attribute is saved and returned.

    Parameters

    • name: string

      name of the label, not including the leading #

    • value: string = ""

      text value of the label; optional

      -
    • isInheritable: boolean = false

    Returns default

  • Adds a new relation to this note. The relation attribute is saved and +

  • isInheritable: boolean = false

Returns default

Returns default

Returns void

Returns void

Returns void

Returns default

Returns void

Returns void

Returns void

Returns void

Returns void

+

Returns void

diff --git a/docs/backend_api/classes/becca_entities_boption.default.html b/docs/backend_api/classes/becca_entities_boption.default.html index e8f01a50c..b13ceb36f 100644 --- a/docs/backend_api/classes/becca_entities_boption.default.html +++ b/docs/backend_api/classes/becca_entities_boption.default.html @@ -1,5 +1,5 @@ default | trilium

Option represents a name-value pair, either directly configurable by the user or some system property.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

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

Accessors

Methods

  • Returns {
        isSynced: undefined | boolean;
        name: string;
        utcDateModified: undefined | string;
        value: string;
    }

  • Mark the entity as (soft) deleted. It will be completely erased later.

    +

Constructors

Properties

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

Accessors

Methods

  • Returns {
        isSynced: undefined | boolean;
        name: string;
        utcDateModified: undefined | string;
        value: string;
    }

  • 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

+

Parameters

Returns void

diff --git a/docs/backend_api/classes/becca_entities_brecent_note.default.html b/docs/backend_api/classes/becca_entities_brecent_note.default.html index 716fc9814..5d536c7b8 100644 --- a/docs/backend_api/classes/becca_entities_brecent_note.default.html +++ b/docs/backend_api/classes/becca_entities_brecent_note.default.html @@ -1,5 +1,5 @@ default | trilium

RecentNote represents recently visited note.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

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

Accessors

Methods

  • Mark the entity as (soft) deleted. It will be completely erased later.

    +

Constructors

Properties

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

Accessors

Methods

  • 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

+

Parameters

Returns void

diff --git a/docs/backend_api/classes/becca_entities_brevision.default.html b/docs/backend_api/classes/becca_entities_brevision.default.html index 42a0b64e5..da201582a 100644 --- a/docs/backend_api/classes/becca_entities_brevision.default.html +++ b/docs/backend_api/classes/becca_entities_brevision.default.html @@ -1,6 +1,6 @@ default | trilium

Revision represents a snapshot of note's title and content at some point in the past. It's used for seamless note versioning.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

blobId? content? contentLength? @@ -47,11 +47,11 @@ It's used for seamless note versioning.

save setContent updateFromRow -

Constructors

Properties

blobId?: string
content?: string | Buffer<ArrayBufferLike>
contentLength?: number
dateCreated?: string
dateLastEdited?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
mime: string
noteId: string
revisionId?: string
title: string
type: string
utcDateCreated: string
utcDateLastEdited?: string
utcDateModified?: string

Accessors

Methods

  • Returns {
        blobId: undefined | string;
        content: undefined | string | Buffer<ArrayBufferLike>;
        contentLength: undefined | number;
        dateCreated: undefined | string;
        dateLastEdited: undefined | string;
        isProtected: undefined | boolean;
        mime: string;
        noteId: string;
        revisionId: undefined | string;
        title: undefined | string;
        type: string;
        utcDateCreated: string;
        utcDateLastEdited: undefined | string;
        utcDateModified: undefined | string;
    }

  • Returns {
        blobId: undefined | string;
        content: undefined | string | Buffer<ArrayBufferLike>;
        contentLength: undefined | number;
        dateCreated: undefined | string;
        dateLastEdited: undefined | string;
        isProtected: undefined | boolean;
        mime: string;
        noteId: string;
        revisionId: undefined | string;
        title: undefined | string;
        type: string;
        utcDateCreated: string;
        utcDateLastEdited: undefined | string;
        utcDateModified: undefined | string;
    }

  • Mark the entity as (soft) deleted. It will be completely erased later.

    +

Constructors

Properties

blobId?: string
content?: string | Buffer<ArrayBufferLike>
contentLength?: number
dateCreated?: string
dateLastEdited?: string
dateModified?: string
isProtected?: boolean
isSynced?: boolean
mime: string
noteId: string
revisionId?: string
title: string
type: string
utcDateCreated: string
utcDateLastEdited?: string
utcDateModified?: string

Accessors

Methods

  • Returns {
        blobId: undefined | string;
        content: undefined | string | Buffer<ArrayBufferLike>;
        contentLength: undefined | number;
        dateCreated: undefined | string;
        dateLastEdited: undefined | string;
        isProtected: undefined | boolean;
        mime: string;
        noteId: string;
        revisionId: undefined | string;
        title: undefined | string;
        type: string;
        utcDateCreated: string;
        utcDateLastEdited: undefined | string;
        utcDateModified: undefined | string;
    }

  • Returns {
        blobId: undefined | string;
        content: undefined | string | Buffer<ArrayBufferLike>;
        contentLength: undefined | number;
        dateCreated: undefined | string;
        dateLastEdited: undefined | string;
        isProtected: undefined | boolean;
        mime: string;
        noteId: string;
        revisionId: undefined | string;
        title: undefined | string;
        type: string;
        utcDateCreated: string;
        utcDateLastEdited: undefined | string;
        utcDateModified: undefined | string;
    }

  • 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

  • Parameters

    • content: string | Buffer<ArrayBufferLike>
    • opts: ContentOpts = {}

    Returns void

+

Parameters

Returns void

diff --git a/docs/backend_api/interfaces/becca_entities_rows.AttachmentRow.html b/docs/backend_api/interfaces/becca_entities_rows.AttachmentRow.html index b50d16189..e0d1e5e48 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.AttachmentRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.AttachmentRow.html @@ -1,4 +1,4 @@ -AttachmentRow | trilium
interface AttachmentRow {
    attachmentId?: string;
    blobId?: string;
    content?: string | Buffer<ArrayBufferLike>;
    contentLength?: number;
    dateModified?: string;
    isProtected?: boolean;
    mime: string;
    ownerId?: string;
    position?: number;
    role: string;
    title: string;
    utcDateModified?: string;
    utcDateScheduledForErasureSince?: string;
}

Properties

attachmentId? +AttachmentRow | trilium
interface AttachmentRow {
    attachmentId?: string;
    blobId?: string;
    content?: string | Buffer<ArrayBufferLike>;
    contentLength?: number;
    dateModified?: string;
    isProtected?: boolean;
    mime: string;
    ownerId?: string;
    position?: number;
    role: string;
    title: string;
    utcDateModified?: string;
    utcDateScheduledForErasureSince?: string;
}

Properties

attachmentId?: string
blobId?: string
content?: string | Buffer<ArrayBufferLike>
contentLength?: number
dateModified?: string
isProtected?: boolean
mime: string
ownerId?: string
position?: number
role: string
title: string
utcDateModified?: string
utcDateScheduledForErasureSince?: string
+

Properties

attachmentId?: string
blobId?: string
content?: string | Buffer<ArrayBufferLike>
contentLength?: number
dateModified?: string
isProtected?: boolean
mime: string
ownerId?: string
position?: number
role: string
title: string
utcDateModified?: string
utcDateScheduledForErasureSince?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.AttributeRow.html b/docs/backend_api/interfaces/becca_entities_rows.AttributeRow.html index 13232fc56..badc7f521 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.AttributeRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.AttributeRow.html @@ -1,4 +1,4 @@ -AttributeRow | trilium
interface AttributeRow {
    attributeId?: string;
    isInheritable?: boolean;
    name: string;
    noteId?: string;
    position?: null | number;
    type: AttributeType;
    utcDateModified?: string;
    value?: string;
}

Properties

attributeId? +AttributeRow | trilium
interface AttributeRow {
    attributeId?: string;
    isInheritable?: boolean;
    name: string;
    noteId?: string;
    position?: null | number;
    type: AttributeType;
    utcDateModified?: string;
    value?: string;
}

Properties

attributeId?: string
isInheritable?: boolean
name: string
noteId?: string
position?: null | number
utcDateModified?: string
value?: string
+

Properties

attributeId?: string
isInheritable?: boolean
name: string
noteId?: string
position?: null | number
utcDateModified?: string
value?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.BlobRow.html b/docs/backend_api/interfaces/becca_entities_rows.BlobRow.html index f5a23e08a..2f038e1c2 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.BlobRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.BlobRow.html @@ -1,6 +1,6 @@ -BlobRow | trilium
interface BlobRow {
    blobId: string;
    content: string | Buffer<ArrayBufferLike>;
    contentLength: number;
    dateModified: string;
    utcDateModified: string;
}

Properties

blobId +BlobRow | trilium
interface BlobRow {
    blobId: string;
    content: string | Buffer<ArrayBufferLike>;
    contentLength: number;
    dateModified: string;
    utcDateModified: string;
}

Properties

blobId: string
content: string | Buffer<ArrayBufferLike>
contentLength: number
dateModified: string
utcDateModified: string
+

Properties

blobId: string
content: string | Buffer<ArrayBufferLike>
contentLength: number
dateModified: string
utcDateModified: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.BranchRow.html b/docs/backend_api/interfaces/becca_entities_rows.BranchRow.html index b5225a135..293f63d5e 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.BranchRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.BranchRow.html @@ -1,4 +1,4 @@ -BranchRow | trilium
interface BranchRow {
    branchId?: string;
    isDeleted?: boolean;
    isExpanded?: boolean;
    noteId: string;
    notePosition?: null | number;
    parentNoteId: string;
    prefix?: null | string;
    utcDateModified?: string;
}

Properties

branchId? +BranchRow | trilium
interface BranchRow {
    branchId?: string;
    isDeleted?: boolean;
    isExpanded?: boolean;
    noteId: string;
    notePosition?: null | number;
    parentNoteId: string;
    prefix?: null | string;
    utcDateModified?: string;
}

Properties

branchId?: string
isDeleted?: boolean
isExpanded?: boolean
noteId: string
notePosition?: null | number
parentNoteId: string
prefix?: null | string
utcDateModified?: string
+

Properties

branchId?: string
isDeleted?: boolean
isExpanded?: boolean
noteId: string
notePosition?: null | number
parentNoteId: string
prefix?: null | string
utcDateModified?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.EtapiTokenRow.html b/docs/backend_api/interfaces/becca_entities_rows.EtapiTokenRow.html index 6a8afd207..f21d78572 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.EtapiTokenRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.EtapiTokenRow.html @@ -1,7 +1,7 @@ -EtapiTokenRow | trilium
interface EtapiTokenRow {
    etapiTokenId?: string;
    isDeleted?: boolean;
    name: string;
    tokenHash: string;
    utcDateCreated?: string;
    utcDateModified?: string;
}

Properties

etapiTokenId? +EtapiTokenRow | trilium
interface EtapiTokenRow {
    etapiTokenId?: string;
    isDeleted?: boolean;
    name: string;
    tokenHash: string;
    utcDateCreated?: string;
    utcDateModified?: string;
}

Properties

etapiTokenId?: string
isDeleted?: boolean
name: string
tokenHash: string
utcDateCreated?: string
utcDateModified?: string
+

Properties

etapiTokenId?: string
isDeleted?: boolean
name: string
tokenHash: string
utcDateCreated?: string
utcDateModified?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.NoteRow.html b/docs/backend_api/interfaces/becca_entities_rows.NoteRow.html index e1ec0ca59..4a56f60b9 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.NoteRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.NoteRow.html @@ -1,4 +1,4 @@ -NoteRow | trilium
interface NoteRow {
    blobId: string;
    content?: string | Buffer<ArrayBufferLike>;
    dateCreated: string;
    dateModified: string;
    deleteId: string;
    isDeleted: boolean;
    isProtected: boolean;
    mime: string;
    noteId: string;
    title: string;
    type:
        | "search"
        | "file"
        | "text"
        | "code"
        | "relationMap"
        | "render"
        | "book"
        | "mermaid"
        | "canvas"
        | "image"
        | "noteMap"
        | "launcher"
        | "doc"
        | "contentWidget"
        | "webView"
        | "mindMap";
    utcDateCreated: string;
    utcDateModified: string;
}

Properties

blobId +NoteRow | trilium
interface NoteRow {
    blobId: string;
    content?: string | Buffer<ArrayBufferLike>;
    dateCreated: string;
    dateModified: string;
    deleteId: string;
    isDeleted: boolean;
    isProtected: boolean;
    mime: string;
    noteId: string;
    title: string;
    type:
        | "search"
        | "file"
        | "text"
        | "code"
        | "relationMap"
        | "render"
        | "book"
        | "mermaid"
        | "canvas"
        | "image"
        | "noteMap"
        | "launcher"
        | "doc"
        | "contentWidget"
        | "webView"
        | "mindMap";
    utcDateCreated: string;
    utcDateModified: string;
}

Properties

blobId: string
content?: string | Buffer<ArrayBufferLike>
dateCreated: string
dateModified: string
deleteId: string
isDeleted: boolean
isProtected: boolean
mime: string
noteId: string
title: string
type:
    | "search"
    | "file"
    | "text"
    | "code"
    | "relationMap"
    | "render"
    | "book"
    | "mermaid"
    | "canvas"
    | "image"
    | "noteMap"
    | "launcher"
    | "doc"
    | "contentWidget"
    | "webView"
    | "mindMap"
utcDateCreated: string
utcDateModified: string
+

Properties

blobId: string
content?: string | Buffer<ArrayBufferLike>
dateCreated: string
dateModified: string
deleteId: string
isDeleted: boolean
isProtected: boolean
mime: string
noteId: string
title: string
type:
    | "search"
    | "file"
    | "text"
    | "code"
    | "relationMap"
    | "render"
    | "book"
    | "mermaid"
    | "canvas"
    | "image"
    | "noteMap"
    | "launcher"
    | "doc"
    | "contentWidget"
    | "webView"
    | "mindMap"
utcDateCreated: string
utcDateModified: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.OptionRow.html b/docs/backend_api/interfaces/becca_entities_rows.OptionRow.html index 951402e00..6b9427cd8 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.OptionRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.OptionRow.html @@ -1,11 +1,11 @@ OptionRow | trilium

Database representation of an option.

Options are key-value pairs that are used to store information such as user preferences (for example the current theme, sync server information), but also information about the state of the application).

-
interface OptionRow {
    isSynced: boolean;
    name: string;
    utcDateModified?: string;
    value: string;
}

Properties

interface OptionRow {
    isSynced: boolean;
    name: string;
    utcDateModified?: string;
    value: string;
}

Properties

isSynced: boolean

true if the value should be synced across multiple instances (e.g. locale) or false if it should be local-only (e.g. theme).

-
name: string

The name of the option.

-
utcDateModified?: string
value: string

The value of the option.

-
+
name: string

The name of the option.

+
utcDateModified?: string
value: string

The value of the option.

+
diff --git a/docs/backend_api/interfaces/becca_entities_rows.RecentNoteRow.html b/docs/backend_api/interfaces/becca_entities_rows.RecentNoteRow.html index d7458d9da..d4fdb1f9d 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.RecentNoteRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.RecentNoteRow.html @@ -1,4 +1,4 @@ -RecentNoteRow | trilium
interface RecentNoteRow {
    noteId: string;
    notePath: string;
    utcDateCreated?: string;
}

Properties

noteId +RecentNoteRow | trilium
interface RecentNoteRow {
    noteId: string;
    notePath: string;
    utcDateCreated?: string;
}

Properties

noteId: string
notePath: string
utcDateCreated?: string
+

Properties

noteId: string
notePath: string
utcDateCreated?: string
diff --git a/docs/backend_api/interfaces/becca_entities_rows.RevisionRow.html b/docs/backend_api/interfaces/becca_entities_rows.RevisionRow.html index a6a5402d3..64ed1ab21 100644 --- a/docs/backend_api/interfaces/becca_entities_rows.RevisionRow.html +++ b/docs/backend_api/interfaces/becca_entities_rows.RevisionRow.html @@ -1,4 +1,4 @@ -RevisionRow | trilium
interface RevisionRow {
    blobId?: string;
    contentLength?: number;
    dateCreated: string;
    dateLastEdited?: string;
    isProtected?: boolean;
    mime: string;
    noteId: string;
    revisionId?: string;
    title: string;
    type: string;
    utcDateCreated: string;
    utcDateLastEdited?: string;
    utcDateModified: string;
}

Properties

blobId? +RevisionRow | trilium
interface RevisionRow {
    blobId?: string;
    contentLength?: number;
    dateCreated: string;
    dateLastEdited?: string;
    isProtected?: boolean;
    mime: string;
    noteId: string;
    revisionId?: string;
    title: string;
    type: string;
    utcDateCreated: string;
    utcDateLastEdited?: string;
    utcDateModified: string;
}

Properties

blobId?: string
contentLength?: number
dateCreated: string
dateLastEdited?: string
isProtected?: boolean
mime: string
noteId: string
revisionId?: string
title: string
type: string
utcDateCreated: string
utcDateLastEdited?: string
utcDateModified: string
+

Properties

blobId?: string
contentLength?: number
dateCreated: string
dateLastEdited?: string
isProtected?: boolean
mime: string
noteId: string
revisionId?: string
title: string
type: string
utcDateCreated: string
utcDateLastEdited?: string
utcDateModified: string
diff --git a/docs/backend_api/types/becca_entities_rows.AttributeType.html b/docs/backend_api/types/becca_entities_rows.AttributeType.html index 26f515f7b..c55212d07 100644 --- a/docs/backend_api/types/becca_entities_rows.AttributeType.html +++ b/docs/backend_api/types/becca_entities_rows.AttributeType.html @@ -1 +1 @@ -AttributeType | trilium
AttributeType: "label" | "relation" | "label-definition" | "relation-definition"
+AttributeType | trilium
AttributeType: "label" | "relation" | "label-definition" | "relation-definition"
diff --git a/docs/backend_api/types/becca_entities_rows.NoteType.html b/docs/backend_api/types/becca_entities_rows.NoteType.html index f509dd66e..8352415bc 100644 --- a/docs/backend_api/types/becca_entities_rows.NoteType.html +++ b/docs/backend_api/types/becca_entities_rows.NoteType.html @@ -1 +1 @@ -NoteType | trilium
NoteType: typeof ALLOWED_NOTE_TYPES[number]
+NoteType | trilium
NoteType: typeof ALLOWED_NOTE_TYPES[number]
diff --git a/docs/backend_api/variables/becca_entities_rows.ALLOWED_NOTE_TYPES.html b/docs/backend_api/variables/becca_entities_rows.ALLOWED_NOTE_TYPES.html index 57d702701..9e0de4bf4 100644 --- a/docs/backend_api/variables/becca_entities_rows.ALLOWED_NOTE_TYPES.html +++ b/docs/backend_api/variables/becca_entities_rows.ALLOWED_NOTE_TYPES.html @@ -1,4 +1,4 @@ ALLOWED_NOTE_TYPES | trilium

Variable ALLOWED_NOTE_TYPESConst

ALLOWED_NOTE_TYPES: readonly [
    "file",
    "image",
    "search",
    "noteMap",
    "launcher",
    "doc",
    "contentWidget",
    "text",
    "relationMap",
    "render",
    "canvas",
    "mermaid",
    "book",
    "webView",
    "code",
    "mindMap",
] = ...

There are many different Note types, some of which are entirely opaque to the end user. Those types should be used only for checking against, they are not for direct use.

-
+
diff --git a/docs/backend_api/variables/services_backend_script_api.default.html b/docs/backend_api/variables/services_backend_script_api.default.html index 7f9939dd7..0411fa280 100644 --- a/docs/backend_api/variables/services_backend_script_api.default.html +++ b/docs/backend_api/variables/services_backend_script_api.default.html @@ -1 +1 @@ -default | trilium
default: new (currentNote: default, apiParams: ApiParams) => Api
+default | trilium
default: new (currentNote: default, apiParams: ApiParams) => Api
diff --git a/docs/backend_api/variables/services_sql.default.html b/docs/backend_api/variables/services_sql.default.html index ccc3ed24f..037d90e28 100644 --- a/docs/backend_api/variables/services_sql.default.html +++ b/docs/backend_api/variables/services_sql.default.html @@ -1,7 +1,7 @@ default | trilium
default: {
    copyDatabase: (targetFilePath: string) => Promise<void>;
    dbConnection: Database;
    disableSlowQueryLogging: <T>(cb: () => T) => T;
    execute: (query: string, params?: any) => RunResult;
    executeMany: (query: string, params: any) => void;
    executeScript: (query: string) => DatabaseType;
    fillParamList: (
        paramIds: string[] | Set<string>,
        truncate?: boolean,
    ) => void;
    getColumn: <T>(query: string, params?: any) => T[];
    getManyRows: <T>(query: string, params: any) => T[];
    getMap: <K extends string | number | symbol, V>(
        query: string,
        params?: any,
    ) => Record<K, V>;
    getRawRows: <T extends {} | unknown[]>(query: string, params?: any) => T[];
    getRow: <T>(query: string, params?: any) => T;
    getRowOrNull: <T>(query: string, params?: any) => T | null;
    getRows: <T>(query: string, params?: any) => T[];
    getValue: <T>(query: string, params?: any) => T;
    insert: <T extends {}>(
        tableName: string,
        rec: T,
        replace?: boolean,
    ) => undefined | null | number | bigint;
    iterateRows: <T>(query: string, params?: any) => IterableIterator<T>;
    rebuildIntegrationTestDatabase: () => void;
    replace: <T extends {}>(tableName: string, rec: T) => number | null;
    transactional: <T>(
        func: (statement: Statement<unknown[], unknown>) => T,
    ) => any;
    upsert: <T extends {}>(
        tableName: string,
        primaryKey: string,
        rec: T,
    ) => void;
}

Type declaration

  • copyDatabase: (targetFilePath: string) => Promise<void>
  • dbConnection: Database
  • disableSlowQueryLogging: <T>(cb: () => T) => T
  • execute: (query: string, params?: any) => RunResult

    Execute SQL

    -
  • executeMany: (query: string, params: any) => void
  • executeScript: (query: string) => DatabaseType
  • fillParamList: (paramIds: string[] | Set<string>, truncate?: boolean) => void
  • getColumn: <T>(query: string, params?: any) => T[]

    Get a first column in an array.

    -
  • getManyRows: <T>(query: string, params: any) => T[]
  • getMap: <K extends string | number | symbol, V>(
        query: string,
        params?: any,
    ) => Record<K, V>

    Get a map of first column mapping to second column.

    -
  • getRawRows: <T extends {} | unknown[]>(query: string, params?: any) => T[]
  • getRow: <T>(query: string, params?: any) => T

    Get first returned row.

    -
  • getRowOrNull: <T>(query: string, params?: any) => T | null
  • getRows: <T>(query: string, params?: any) => T[]

    Get all returned rows.

    -
  • getValue: <T>(query: string, params?: any) => T

    Get single value from the given query - first column from first returned row.

    -
  • insert: <T extends {}>(
        tableName: string,
        rec: T,
        replace?: boolean,
    ) => undefined | null | number | bigint
  • iterateRows: <T>(query: string, params?: any) => IterableIterator<T>
  • rebuildIntegrationTestDatabase: () => void
  • replace: <T extends {}>(tableName: string, rec: T) => number | null
  • transactional: <T>(func: (statement: Statement<unknown[], unknown>) => T) => any
  • upsert: <T extends {}>(tableName: string, primaryKey: string, rec: T) => void
+
  • executeMany: (query: string, params: any) => void
  • executeScript: (query: string) => DatabaseType
  • fillParamList: (paramIds: string[] | Set<string>, truncate?: boolean) => void
  • getColumn: <T>(query: string, params?: any) => T[]

    Get a first column in an array.

    +
  • getManyRows: <T>(query: string, params: any) => T[]
  • getMap: <K extends string | number | symbol, V>(
        query: string,
        params?: any,
    ) => Record<K, V>

    Get a map of first column mapping to second column.

    +
  • getRawRows: <T extends {} | unknown[]>(query: string, params?: any) => T[]
  • getRow: <T>(query: string, params?: any) => T

    Get first returned row.

    +
  • getRowOrNull: <T>(query: string, params?: any) => T | null
  • getRows: <T>(query: string, params?: any) => T[]

    Get all returned rows.

    +
  • getValue: <T>(query: string, params?: any) => T

    Get single value from the given query - first column from first returned row.

    +
  • insert: <T extends {}>(
        tableName: string,
        rec: T,
        replace?: boolean,
    ) => undefined | null | number | bigint
  • iterateRows: <T>(query: string, params?: any) => IterableIterator<T>
  • rebuildIntegrationTestDatabase: () => void
  • replace: <T extends {}>(tableName: string, rec: T) => number | null
  • transactional: <T>(func: (statement: Statement<unknown[], unknown>) => T) => any
  • upsert: <T extends {}>(tableName: string, primaryKey: string, rec: T) => void
  • diff --git a/src/services/sql.ts b/src/services/sql.ts index 0f1cf5ea4..d2b14c669 100644 --- a/src/services/sql.ts +++ b/src/services/sql.ts @@ -347,7 +347,6 @@ export default { /** * Get single value from the given query - first column from first returned row. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns single value @@ -357,7 +356,6 @@ export default { /** * Get first returned row. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns - map of column name to column value @@ -368,7 +366,6 @@ export default { /** * Get all returned rows. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns - array of all rows, each row is a map of column name to column value @@ -381,7 +378,6 @@ export default { /** * Get a map of first column mapping to second column. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns - map of first column to second column @@ -391,7 +387,6 @@ export default { /** * Get a first column in an array. * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed * @returns array of first column of all returned rows @@ -401,7 +396,6 @@ export default { /** * Execute SQL * - * @method * @param query - SQL query with ? used as parameter placeholder * @param params - array of params if needed */