Skip to main content

Class: BaseDocumentStore

Constructors

constructor

new BaseDocumentStore()

Methods

addDocuments

Abstract addDocuments(docs, allowUpdate): Promise<void>

Parameters

NameType
docsBaseNode[]
allowUpdateboolean

Returns

Promise<void>

Defined in

storage/docStore/types.ts:27


deleteDocument

Abstract deleteDocument(docId, raiseError): Promise<void>

Parameters

NameType
docIdstring
raiseErrorboolean

Returns

Promise<void>

Defined in

storage/docStore/types.ts:34


deleteRefDoc

Abstract deleteRefDoc(refDocId, raiseError): Promise<void>

Parameters

NameType
refDocIdstring
raiseErrorboolean

Returns

Promise<void>

Defined in

storage/docStore/types.ts:48


docs

Abstract docs(): Promise<Record<string, BaseNode>>

Returns

Promise<Record<string, BaseNode>>

Defined in

storage/docStore/types.ts:25


documentExists

Abstract documentExists(docId): Promise<boolean>

Parameters

NameType
docIdstring

Returns

Promise<boolean>

Defined in

storage/docStore/types.ts:36


getAllRefDocInfo

Abstract getAllRefDocInfo(): Promise<undefined | Record<string, RefDocInfo>>

Returns

Promise<undefined | Record<string, RefDocInfo>>

Defined in

storage/docStore/types.ts:44


getDocument

Abstract getDocument(docId, raiseError): Promise<undefined | BaseNode>

Parameters

NameType
docIdstring
raiseErrorboolean

Returns

Promise<undefined | BaseNode>

Defined in

storage/docStore/types.ts:29


getDocumentHash

Abstract getDocumentHash(docId): Promise<undefined | string>

Parameters

NameType
docIdstring

Returns

Promise<undefined | string>

Defined in

storage/docStore/types.ts:41


getNode

getNode(nodeId, raiseError?): Promise<BaseNode>

Parameters

NameTypeDefault value
nodeIdstringundefined
raiseErrorbooleantrue

Returns

Promise<BaseNode>

Defined in

storage/docStore/types.ts:57


getNodeDict

getNodeDict(nodeIdDict): Promise<Record<number, BaseNode>>

Parameters

NameType
nodeIdDictObject

Returns

Promise<Record<number, BaseNode>>

Defined in

storage/docStore/types.ts:65


getNodes

getNodes(nodeIds, raiseError?): Promise<BaseNode[]>

Parameters

NameTypeDefault value
nodeIdsstring[]undefined
raiseErrorbooleantrue

Returns

Promise<BaseNode[]>

Defined in

storage/docStore/types.ts:51


getRefDocInfo

Abstract getRefDocInfo(refDocId): Promise<undefined | RefDocInfo>

Parameters

NameType
refDocIdstring

Returns

Promise<undefined | RefDocInfo>

Defined in

storage/docStore/types.ts:46


persist

persist(persistPath?, fs?): void

Parameters

NameTypeDefault value
persistPathstringdefaultPersistPath
fs?GenericFileSystemundefined

Returns

void

Defined in

storage/docStore/types.ts:17


setDocumentHash

Abstract setDocumentHash(docId, docHash): void

Parameters

NameType
docIdstring
docHashstring

Returns

void

Defined in

storage/docStore/types.ts:39