Class: SimpleDocumentStore
Hierarchy
KVDocumentStore
↳
SimpleDocumentStore
Constructors
constructor
• new SimpleDocumentStore(kvStore?
, namespace?
)
Parameters
Name | Type |
---|---|
kvStore? | SimpleKVStore |
namespace? | string |
Overrides
KVDocumentStore.constructor
Defined in
packages/core/src/storage/docStore/SimpleDocumentStore.ts:19
Properties
kvStore
• Private
kvStore: SimpleKVStore
Defined in
packages/core/src/storage/docStore/SimpleDocumentStore.ts:17
Methods
addDocuments
▸ addDocuments(docs
, allowUpdate?
): Promise
<void
>
Parameters
Name | Type | Default value |
---|---|---|
docs | BaseNode <Metadata >[] | undefined |
allowUpdate | boolean | true |
Returns
Promise
<void
>
Inherited from
KVDocumentStore.addDocuments
Defined in
packages/core/src/storage/docStore/KVDocumentStore.ts:33
deleteDocument
▸ deleteDocument(docId
, raiseError?
, removeRefDocNode?
): Promise
<void
>
Parameters
Name | Type | Default value |
---|---|---|
docId | string | undefined |
raiseError | boolean | true |
removeRefDocNode | boolean | true |
Returns
Promise
<void
>
Inherited from
KVDocumentStore.deleteDocument
Defined in
packages/core/src/storage/docStore/KVDocumentStore.ts:131
deleteRefDoc
▸ deleteRefDoc(refDocId
, raiseError?
): Promise
<void
>
Parameters
Name | Type | Default value |
---|---|---|
refDocId | string | undefined |
raiseError | boolean | true |
Returns
Promise
<void
>
Inherited from
KVDocumentStore.deleteRefDoc
Defined in
packages/core/src/storage/docStore/KVDocumentStore.ts:148
docs
▸ docs(): Promise
<Record
<string
, BaseNode
<Metadata
>>>
Returns
Promise
<Record
<string
, BaseNode
<Metadata
>>>
Inherited from
KVDocumentStore.docs
Defined in
packages/core/src/storage/docStore/KVDocumentStore.ts:24
documentExists
▸ documentExists(docId
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
docId | string |
Returns
Promise
<boolean
>
Inherited from
KVDocumentStore.documentExists
Defined in
packages/core/src/storage/docStore/KVDocumentStore.ts:105
getAllRefDocInfo
▸ getAllRefDocInfo(): Promise
<undefined
| Record
<string
, RefDocInfo
>>
Returns
Promise
<undefined
| Record
<string
, RefDocInfo
>>
Inherited from
KVDocumentStore.getAllRefDocInfo
Defined in
packages/core/src/storage/docStore/KVDocumentStore.ts:93
getDocument
▸ getDocument(docId
, raiseError?
): Promise
<undefined
| BaseNode
<Metadata
>>
Parameters
Name | Type | Default value |
---|---|---|
docId | string | undefined |
raiseError | boolean | true |
Returns
Promise
<undefined
| BaseNode
<Metadata
>>
Inherited from
KVDocumentStore.getDocument
Defined in
packages/core/src/storage/docStore/KVDocumentStore.ts:73
getDocumentHash
▸ getDocumentHash(docId
): Promise
<undefined
| string
>
Parameters
Name | Type |
---|---|
docId | string |
Returns
Promise
<undefined
| string
>
Inherited from
KVDocumentStore.getDocumentHash
Defined in
packages/core/src/storage/docStore/KVDocumentStore.ts:174
getNode
▸ getNode(nodeId
, raiseError?
): Promise
<BaseNode
<Metadata
>>
Parameters
Name | Type | Default value |
---|---|---|
nodeId | string | undefined |
raiseError | boolean | true |
Returns
Inherited from
KVDocumentStore.getNode
Defined in
packages/core/src/storage/docStore/types.ts:57
getNodeDict
▸ getNodeDict(nodeIdDict
): Promise
<Record
<number
, BaseNode
<Metadata
>>>
Parameters
Name | Type |
---|---|
nodeIdDict | Object |
Returns
Promise
<Record
<number
, BaseNode
<Metadata
>>>
Inherited from
KVDocumentStore.getNodeDict
Defined in
packages/core/src/storage/docStore/types.ts:65
getNodes
▸ getNodes(nodeIds
, raiseError?
): Promise
<BaseNode
<Metadata
>[]>
Parameters
Name | Type | Default value |
---|---|---|
nodeIds | string [] | undefined |
raiseError | boolean | true |
Returns
Inherited from
KVDocumentStore.getNodes
Defined in
packages/core/src/storage/docStore/types.ts:51
getRefDocInfo
▸ getRefDocInfo(refDocId
): Promise
<undefined
| RefDocInfo
>
Parameters
Name | Type |
---|---|
refDocId | string |
Returns
Promise
<undefined
| RefDocInfo
>
Inherited from
KVDocumentStore.getRefDocInfo
Defined in
packages/core/src/storage/docStore/KVDocumentStore.ts:88
persist
▸ persist(persistPath?
, fs?
): Promise
<void
>
Parameters
Name | Type |
---|---|
persistPath | string |
fs? | GenericFileSystem |
Returns
Promise
<void
>
Overrides
KVDocumentStore.persist
Defined in
packages/core/src/storage/docStore/SimpleDocumentStore.ts:52
refDocExists
▸ refDocExists(refDocId
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
refDocId | string |
Returns
Promise
<boolean
>
Inherited from
KVDocumentStore.refDocExists
Defined in
packages/core/src/storage/docStore/KVDocumentStore.ts:101
setDocumentHash
▸ setDocumentHash(docId
, docHash
): Promise
<void
>
Parameters
Name | Type |
---|---|
docId | string |
docHash | string |
Returns
Promise
<void
>
Inherited from
KVDocumentStore.setDocumentHash
Defined in
packages/core/src/storage/docStore/KVDocumentStore.ts:169
toDict
▸ toDict(): SaveDict
Returns
SaveDict
Defined in
packages/core/src/storage/docStore/SimpleDocumentStore.ts:73
fromDict
▸ Static
fromDict(saveDict
, namespace?
): SimpleDocumentStore
Parameters
Name | Type |
---|---|
saveDict | SaveDict |
namespace? | string |
Returns
Defined in
packages/core/src/storage/docStore/SimpleDocumentStore.ts:68
fromPersistDir
▸ Static
fromPersistDir(persistDir?
, namespace?
, fsModule?
): Promise
<SimpleDocumentStore
>
Parameters
Name | Type | Default value |
---|---|---|
persistDir | string | DEFAULT_PERSIST_DIR |
namespace? | string | undefined |
fsModule? | GenericFileSystem | undefined |
Returns
Promise
<SimpleDocumentStore
>
Defined in
packages/core/src/storage/docStore/SimpleDocumentStore.ts:26
fromPersistPath
▸ Static
fromPersistPath(persistPath
, namespace?
, fs?
): Promise
<SimpleDocumentStore
>
Parameters
Name | Type |
---|---|
persistPath | string |
namespace? | string |
fs? | GenericFileSystem |
Returns
Promise
<SimpleDocumentStore
>
Defined in
packages/core/src/storage/docStore/SimpleDocumentStore.ts:42