Skip to main content
Version: 0.8.x

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

NameType
ValueValue
Keystring

Type declaration

NameType
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: CreateOpts & { ignoreEmpty?: boolean ; onlyIndexed?: boolean }


DocID

Ƭ DocID: CommitID | StreamID | string


DocumentCache

Ƭ DocumentCache: CacheMap<ModelInstanceDocument>


DocumentLoaderParams

Ƭ DocumentLoaderParams: Object

Type declaration

NameTypeDescription
cache?DocumentCache | booleanA supported cache implementation, true to use the default implementation or false to disable the cache (default)
ceramicCeramicAPIA Ceramic client instance
deterministicKeysCache?DeterministicKeysCacheOptional cache for deterministic streams keys
multiqueryTimeout?numberMultiQuery request timeout in milliseconds

LoadKey

Ƭ LoadKey: Object

Type declaration

NameTypeDescription
genesis?GenesisCommitOptional genesis commit for deterministic streams
idDocIDDocument ID
opts?LoadOptsStream load options

UpdateDocOptions

Ƭ UpdateDocOptions: Object

Type declaration

NameType
replace?boolean
shouldIndex?boolean
version?string

UpdateOptions

Ƭ UpdateOptions: UpdateOpts & UpdateDocOptions