Module: loader
ComposeDB loader module, handling streams loading and caching.
Installation
npm install @composedb/loader
Classes
Type Aliases
CacheMap
Ƭ CacheMap<Value
, Key
>: Object
Type parameters
Name | Type |
---|---|
Value | Value |
Key | string |
Type declaration
Name | Type |
---|---|
clear | () => any |
delete | (key : Key ) => any |
get | (key : Key ) => void | Promise <Value > |
set | (key : Key , value : Promise <Value >) => any |
ConnectionQuery
Ƭ ConnectionQuery: BaseQuery
& ConnectionArguments
CreateOptions
Ƭ CreateOptions: CreateOpts
& { controller?
: string
; shouldIndex?
: boolean
}
DeterministicKeysCache
Ƭ DeterministicKeysCache: CacheMap
<LoadKey
>
DeterministicLoadOptions
Ƭ DeterministicLoadOptions: CreateOptions
& { onlyIndexed?
: boolean
}
DocID
Ƭ DocID: CommitID
| StreamID
| string
DocumentCache
Ƭ DocumentCache: CacheMap
<ModelInstanceDocument
>
DocumentLoaderParams
Ƭ DocumentLoaderParams: Object
Type declaration
Name | Type | Description |
---|---|---|
cache? | DocumentCache | boolean | A supported cache implementation, true to use the default implementation or false to disable the cache (default) |
ceramic | CeramicAPI | A Ceramic client instance |
deterministicKeysCache? | DeterministicKeysCache | Optional cache for deterministic streams keys |
multiqueryTimeout? | number | MultiQuery request timeout in milliseconds |
LoadKey
Ƭ LoadKey: Object
Type declaration
Name | Type | Description |
---|---|---|
genesis? | GenesisCommit | Optional genesis commit for deterministic streams |
id | DocID | Document ID |
opts? | LoadOpts | Stream load options |
UpdateDocOptions
Ƭ UpdateDocOptions: Object
Type declaration
Name | Type |
---|---|
replace? | boolean |
shouldIndex? | boolean |
version? | string |
UpdateOptions
Ƭ UpdateOptions: UpdateOpts
& UpdateDocOptions