본문으로 건너뛰기

Class: BaseDocumentStore

Constructors

constructor

new BaseDocumentStore(): BaseDocumentStore

Returns

BaseDocumentStore

Methods

addDocuments

addDocuments(docs, allowUpdate): Promise<void>

Parameters

NameType
docsBaseNode<Metadata>[]
allowUpdateboolean

Returns

Promise<void>

Defined in

packages/core/src/storage/docStore/types.ts:27


deleteDocument

deleteDocument(docId, raiseError): Promise<void>

Parameters

NameType
docIdstring
raiseErrorboolean

Returns

Promise<void>

Defined in

packages/core/src/storage/docStore/types.ts:34


deleteRefDoc

deleteRefDoc(refDocId, raiseError): Promise<void>

Parameters

NameType
refDocIdstring
raiseErrorboolean

Returns

Promise<void>

Defined in

packages/core/src/storage/docStore/types.ts:50


docs

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

Returns

Promise<Record<string, BaseNode<Metadata>>>

Defined in

packages/core/src/storage/docStore/types.ts:25


documentExists

documentExists(docId): Promise<boolean>

Parameters

NameType
docIdstring

Returns

Promise<boolean>

Defined in

packages/core/src/storage/docStore/types.ts:36


getAllDocumentHashes

getAllDocumentHashes(): Promise<Record<string, string>>

Returns

Promise<Record<string, string>>

Defined in

packages/core/src/storage/docStore/types.ts:43


getAllRefDocInfo

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

Returns

Promise<undefined | Record<string, RefDocInfo>>

Defined in

packages/core/src/storage/docStore/types.ts:46


getDocument

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

Parameters

NameType
docIdstring
raiseErrorboolean

Returns

Promise<undefined | BaseNode<Metadata>>

Defined in

packages/core/src/storage/docStore/types.ts:29


getDocumentHash

getDocumentHash(docId): Promise<undefined | string>

Parameters

NameType
docIdstring

Returns

Promise<undefined | string>

Defined in

packages/core/src/storage/docStore/types.ts:41


getNode

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

Parameters

NameTypeDefault value
nodeIdstringundefined
raiseErrorbooleantrue

Returns

Promise<BaseNode<Metadata>>

Defined in

packages/core/src/storage/docStore/types.ts:59


getNodeDict

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

Parameters

NameType
nodeIdDictObject

Returns

Promise<Record<number, BaseNode<Metadata>>>

Defined in

packages/core/src/storage/docStore/types.ts:67


getNodes

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

Parameters

NameTypeDefault value
nodeIdsstring[]undefined
raiseErrorbooleantrue

Returns

Promise<BaseNode<Metadata>[]>

Defined in

packages/core/src/storage/docStore/types.ts:53


getRefDocInfo

getRefDocInfo(refDocId): Promise<undefined | RefDocInfo>

Parameters

NameType
refDocIdstring

Returns

Promise<undefined | RefDocInfo>

Defined in

packages/core/src/storage/docStore/types.ts:48


persist

persist(persistPath?, fs?): void

Parameters

NameTypeDefault value
persistPathstringdefaultPersistPath
fs?GenericFileSystemundefined

Returns

void

Defined in

packages/core/src/storage/docStore/types.ts:17


setDocumentHash

setDocumentHash(docId, docHash): void

Parameters

NameType
docIdstring
docHashstring

Returns

void

Defined in

packages/core/src/storage/docStore/types.ts:39