Ga naar hoofdinhoud

Class: SimpleDocumentStore

Extends

  • KVDocumentStore

Constructors

new SimpleDocumentStore()

new SimpleDocumentStore(kvStore?, namespace?): SimpleDocumentStore

Parameters

kvStore?: SimpleKVStore

namespace?: string

Returns

SimpleDocumentStore

Overrides

KVDocumentStore.constructor

Source

packages/core/src/storage/docStore/SimpleDocumentStore.ts:18

Properties

kvStore

private kvStore: SimpleKVStore

Source

packages/core/src/storage/docStore/SimpleDocumentStore.ts:16

Methods

addDocuments()

addDocuments(docs, allowUpdate): Promise<void>

Parameters

docs: BaseNode <Metadata>[]

allowUpdate: boolean= true

Returns

Promise<void>

Inherited from

KVDocumentStore.addDocuments

Source

packages/core/src/storage/docStore/KVDocumentStore.ts:35


deleteDocument()

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

Parameters

docId: string

raiseError: boolean= true

removeRefDocNode: boolean= true

Returns

Promise<void>

Inherited from

KVDocumentStore.deleteDocument

Source

packages/core/src/storage/docStore/KVDocumentStore.ts:135


deleteRefDoc()

deleteRefDoc(refDocId, raiseError): Promise<void>

Parameters

refDocId: string

raiseError: boolean= true

Returns

Promise<void>

Inherited from

KVDocumentStore.deleteRefDoc

Source

packages/core/src/storage/docStore/KVDocumentStore.ts:152


docs()

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

Returns

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

Inherited from

KVDocumentStore.docs

Source

packages/core/src/storage/docStore/KVDocumentStore.ts:26


documentExists()

documentExists(docId): Promise<boolean>

Parameters

docId: string

Returns

Promise<boolean>

Inherited from

KVDocumentStore.documentExists

Source

packages/core/src/storage/docStore/KVDocumentStore.ts:109


getAllDocumentHashes()

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

Returns

Promise<Record<string, string>>

Inherited from

KVDocumentStore.getAllDocumentHashes

Source

packages/core/src/storage/docStore/KVDocumentStore.ts:183


getAllRefDocInfo()

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

Returns

Promise<undefined | Record<string, RefDocInfo>>

Inherited from

KVDocumentStore.getAllRefDocInfo

Source

packages/core/src/storage/docStore/KVDocumentStore.ts:97


getDocument()

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

Parameters

docId: string

raiseError: boolean= true

Returns

Promise<undefined | BaseNode <Metadata>>

Inherited from

KVDocumentStore.getDocument

Source

packages/core/src/storage/docStore/KVDocumentStore.ts:77


getDocumentHash()

getDocumentHash(docId): Promise<undefined | string>

Parameters

docId: string

Returns

Promise<undefined | string>

Inherited from

KVDocumentStore.getDocumentHash

Source

packages/core/src/storage/docStore/KVDocumentStore.ts:178


getNode()

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

Parameters

nodeId: string

raiseError: boolean= true

Returns

Promise <BaseNode <Metadata>>

Inherited from

KVDocumentStore.getNode

Source

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


getNodeDict()

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

Parameters

nodeIdDict

Returns

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

Inherited from

KVDocumentStore.getNodeDict

Source

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


getNodes()

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

Parameters

nodeIds: string[]

raiseError: boolean= true

Returns

Promise <BaseNode <Metadata>[]>

Inherited from

KVDocumentStore.getNodes

Source

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


getRefDocInfo()

getRefDocInfo(refDocId): Promise<undefined | RefDocInfo>

Parameters

refDocId: string

Returns

Promise<undefined | RefDocInfo>

Inherited from

KVDocumentStore.getRefDocInfo

Source

packages/core/src/storage/docStore/KVDocumentStore.ts:92


persist()

persist(persistPath, fs?): Promise<void>

Parameters

persistPath: string= undefined

fs?: GenericFileSystem

Returns

Promise<void>

Overrides

KVDocumentStore.persist

Source

packages/core/src/storage/docStore/SimpleDocumentStore.ts:51


refDocExists()

refDocExists(refDocId): Promise<boolean>

Parameters

refDocId: string

Returns

Promise<boolean>

Inherited from

KVDocumentStore.refDocExists

Source

packages/core/src/storage/docStore/KVDocumentStore.ts:105


setDocumentHash()

setDocumentHash(docId, docHash): Promise<void>

Parameters

docId: string

docHash: string

Returns

Promise<void>

Inherited from

KVDocumentStore.setDocumentHash

Source

packages/core/src/storage/docStore/KVDocumentStore.ts:173


toDict()

toDict(): SaveDict

Returns

SaveDict

Source

packages/core/src/storage/docStore/SimpleDocumentStore.ts:72


fromDict()

static fromDict(saveDict, namespace?): SimpleDocumentStore

Parameters

saveDict: SaveDict

namespace?: string

Returns

SimpleDocumentStore

Source

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


fromPersistDir()

static fromPersistDir(persistDir, namespace?, fsModule?): Promise <SimpleDocumentStore>

Parameters

persistDir: string= DEFAULT_PERSIST_DIR

namespace?: string

fsModule?: GenericFileSystem

Returns

Promise <SimpleDocumentStore>

Source

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


fromPersistPath()

static fromPersistPath(persistPath, namespace?, fs?): Promise <SimpleDocumentStore>

Parameters

persistPath: string

namespace?: string

fs?: GenericFileSystem

Returns

Promise <SimpleDocumentStore>

Source

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