Extends
Members
attachmentId :string
Type:
- string
- Source:
(protected) becca
- Overrides:
- Source:
blobId :string
Type:
- string
- Source:
contentLength :int
optionally added to the entity
Type:
- Source:
dateModified :string
Type:
- string
- Source:
isProtected :boolean
Type:
- boolean
- Source:
mime :string
Type:
- string
- Source:
ownerId :string
either noteId or revisionId to which this attachment belongs
Type:
- string
- Source:
position :int
Type:
- Source:
role :string
Type:
- string
- Source:
title :string
Type:
- string
- Source:
utcDateModified :string
Type:
- string
- Source:
utcDateScheduledForErasureSince :string
Type:
- string
- Source:
Methods
(protected) _getContent() → {string|Buffer}
- Overrides:
- Source:
Returns:
- Type
- string | Buffer
(protected) _setContent()
- Overrides:
- Source:
(protected) beforeSaving()
- Overrides:
- Source:
convertToNote() → {Object}
- Source:
Returns:
- Type
- Object
copy() → {BAttachment}
- Source:
Returns:
- Type
- BAttachment
(protected) generateHash() → {string}
- Overrides:
- Source:
Returns:
- Type
- string
getContent() → {string|Buffer}
- Source:
Returns:
- Type
- string | Buffer
getNote() → {BNote}
- Source:
Returns:
- Type
- BNote
(abstract, protected) getPojo()
- Overrides:
- Source:
(protected) getPojoToSave()
- Overrides:
- Source:
(protected) getUtcDateChanged()
- Overrides:
- Source:
hasStringContent() → {boolean}
- Source:
Returns:
true if the note has string content (not binary)
- Type
- boolean
markAsDeleted(deleteIdopt)
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:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
deleteId |
<optional> |
null |
- Overrides:
- Source:
(protected) putEntityChange()
- Overrides:
- Source:
save() → {this}
Saves entity - executes SQL, but doesn't commit the transaction on its own
- Overrides:
- Source:
Returns:
- Type
- this
setContent(content, optsopt)
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content |
||||||||||||||||||
opts |
object |
<optional> |
Properties
|
- Source: