Documentation
Classes
AbstractDatastore

Class: abstract AbstractDatastore<DocMeta, Filter>

Extended By

Type parameters

Parameter
DocMeta extends BaseMeta
Filter extends BaseFilter<DocMeta>

Constructors

new AbstractDatastore(args)

new AbstractDatastore<DocMeta, Filter>(args): AbstractDatastore<DocMeta, Filter>

Parameters

ParameterType
argsOpts<DocMeta, Filter>

Returns

AbstractDatastore<DocMeta, Filter>

Source

src/datastore/datastore.ts:36 (opens in a new tab)

Properties

ModifierPropertyTypeDescriptionSource
abstractdatastoreProviderProvider-src/datastore/datastore.ts:26 (opens in a new tab)
abstractdatastoreTypeType-src/datastore/datastore.ts:25 (opens in a new tab)

Methods

addEvents()

addEvents(events): AbstractDatastore<DocMeta, Filter>

Add event handlers to the datastore.

Parameters

ParameterType
eventsEvents<DocMeta, Filter>

Returns

AbstractDatastore<DocMeta, Filter>

Source

src/datastore/datastore.ts:153 (opens in a new tab)


abstract delete()

abstract delete(docIds): Promise<void>

Parameters

ParameterType
docIdsstring[]

Returns

Promise<void>

Source

src/datastore/datastore.ts:22 (opens in a new tab)


abstract deleteAll()

abstract deleteAll(): Promise<void>

Returns

Promise<void>

Source

src/datastore/datastore.ts:23 (opens in a new tab)


getEvents()

getEvents(): Events<DocMeta, Filter>

Get the current event handlers

Returns

Events<DocMeta, Filter>

Source

src/datastore/datastore.ts:148 (opens in a new tab)


query()

query(query, context?): Promise<QueryResult<DocMeta>>

Parameters

ParameterType
queryQuery<DocMeta, Filter>
context?Ctx

Returns

Promise<QueryResult<DocMeta>>

Source

src/datastore/datastore.ts:53 (opens in a new tab)


setEvents()

setEvents(events): AbstractDatastore<DocMeta, Filter>

Set the event handlers to a new set of events. Removes all existing event handlers. Set to empty object {} to remove all events.

Parameters

ParameterType
eventsEvents<DocMeta, Filter>

Returns

AbstractDatastore<DocMeta, Filter>

Source

src/datastore/datastore.ts:162 (opens in a new tab)


abstract upsert()

abstract upsert(docs, context?): Promise<void>

Parameters

ParameterType
docsDoc<DocMeta>[]
context?Ctx

Returns

Promise<void>

Source

src/datastore/datastore.ts:18 (opens in a new tab)