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
Parameter | Type |
---|---|
args | Opts <DocMeta , Filter > |
Returns
AbstractDatastore
<DocMeta
, Filter
>
Source
src/datastore/datastore.ts:36 (opens in a new tab)
Properties
Modifier | Property | Type | Description | Source |
---|---|---|---|---|
abstract | datastoreProvider | Provider | - | src/datastore/datastore.ts:26 (opens in a new tab) |
abstract | datastoreType | Type | - | src/datastore/datastore.ts:25 (opens in a new tab) |
Methods
addEvents()
addEvents(
events
):AbstractDatastore
<DocMeta
,Filter
>
Add event handlers to the datastore.
Parameters
Parameter | Type |
---|---|
events | Events <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
Parameter | Type |
---|---|
docIds | string [] |
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
Parameter | Type |
---|---|
query | Query <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
Parameter | Type |
---|---|
events | Events <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
Parameter | Type |
---|---|
docs | Doc <DocMeta >[] |
context ? | Ctx |
Returns
Promise
<void
>