Class: BaseDocumentStore
Constructors
constructor
• new BaseDocumentStore()
Methods
addDocuments
▸ Abstract
addDocuments(docs
, allowUpdate
): Promise
<void
>
Parameters
Name | Type |
---|---|
docs | BaseNode [] |
allowUpdate | boolean |
Returns
Promise
<void
>
Defined in
deleteDocument
▸ Abstract
deleteDocument(docId
, raiseError
): Promise
<void
>
Parameters
Name | Type |
---|---|
docId | string |
raiseError | boolean |
Returns
Promise
<void
>
Defined in
deleteRefDoc
▸ Abstract
deleteRefDoc(refDocId
, raiseError
): Promise
<void
>
Parameters
Name | Type |
---|---|
refDocId | string |
raiseError | boolean |
Returns
Promise
<void
>
Defined in
docs
▸ Abstract
docs(): Promise
<Record
<string
, BaseNode
>>
Returns
Promise
<Record
<string
, BaseNode
>>
Defined in
documentExists
▸ Abstract
documentExists(docId
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
docId | string |
Returns
Promise
<boolean
>
Defined in
getAllRefDocInfo
▸ Abstract
getAllRefDocInfo(): Promise
<undefined
| Record
<string
, RefDocInfo
>>
Returns
Promise
<undefined
| Record
<string
, RefDocInfo
>>
Defined in
getDocument
▸ Abstract
getDocument(docId
, raiseError
): Promise
<undefined
| BaseNode
>
Parameters
Name | Type |
---|---|
docId | string |
raiseError | boolean |
Returns
Promise
<undefined
| BaseNode
>
Defined in
getDocumentHash
▸ Abstract
getDocumentHash(docId
): Promise
<undefined
| string
>
Parameters
Name | Type |
---|---|
docId | string |
Returns
Promise
<undefined
| string
>
Defined in
getNode
▸ getNode(nodeId
, raiseError?
): Promise
<BaseNode
>
Parameters
Name | Type | Default value |
---|---|---|
nodeId | string | undefined |
raiseError | boolean | true |
Returns
Promise
<BaseNode
>
Defined in
getNodeDict
▸ getNodeDict(nodeIdDict
): Promise
<Record
<number
, BaseNode
>>
Parameters
Name | Type |
---|---|
nodeIdDict | Object |
Returns
Promise
<Record
<number
, BaseNode
>>
Defined in
getNodes
▸ getNodes(nodeIds
, raiseError?
): Promise
<BaseNode
[]>
Parameters
Name | Type | Default value |
---|---|---|
nodeIds | string [] | undefined |
raiseError | boolean | true |
Returns
Promise
<BaseNode
[]>
Defined in
getRefDocInfo
▸ Abstract
getRefDocInfo(refDocId
): Promise
<undefined
| RefDocInfo
>
Parameters
Name | Type |
---|---|
refDocId | string |
Returns
Promise
<undefined
| RefDocInfo
>
Defined in
persist
▸ persist(persistPath?
, fs?
): void
Parameters
Name | Type | Default value |
---|---|---|
persistPath | string | defaultPersistPath |
fs? | GenericFileSystem | undefined |
Returns
void
Defined in
setDocumentHash
▸ Abstract
setDocumentHash(docId
, docHash
): void
Parameters
Name | Type |
---|---|
docId | string |
docHash | string |
Returns
void