Class: abstract
AbstractHybridDatastore<DocMeta, Filter>
Extends
AbstractDatastore
<DocMeta
,Filter
>
Type parameters
Parameter |
---|
DocMeta extends BaseMeta |
Filter extends BaseFilter <DocMeta > |
Constructors
new AbstractHybridDatastore(args)
new AbstractHybridDatastore<
DocMeta
,Filter
>(args
):AbstractHybridDatastore
<DocMeta
,Filter
>
Parameters
Parameter | Type |
---|---|
args | OptsHybrid <DocMeta , Filter > |
Returns
AbstractHybridDatastore
<DocMeta
, Filter
>
Overrides
Source
src/datastore/hybrid-datastore.ts:11 (opens in a new tab)
Properties
Modifier | Property | Type | Description | Inheritance | Source |
---|---|---|---|---|---|
abstract | datastoreProvider | Provider | - | AbstractDatastore .datastoreProvider | src/datastore/datastore.ts:26 (opens in a new tab) |
abstract | datastoreType | Type | - | AbstractDatastore .datastoreType | src/datastore/datastore.ts:25 (opens in a new tab) |
Methods
addEvents()
addEvents(
events
):AbstractHybridDatastore
<DocMeta
,Filter
>
Add event handlers to the datastore.
Parameters
Parameter | Type |
---|---|
events | Events <DocMeta , Filter > |
Returns
AbstractHybridDatastore
<DocMeta
, Filter
>
Inherited from
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
>
Inherited from
Source
src/datastore/datastore.ts:22 (opens in a new tab)
abstract
deleteAll()
abstract
deleteAll():Promise
<void
>
Returns
Promise
<void
>
Inherited from
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
>
Inherited from
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
>>
Inherited from
Source
src/datastore/datastore.ts:53 (opens in a new tab)
setEvents()
setEvents(
events
):AbstractHybridDatastore
<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
AbstractHybridDatastore
<DocMeta
, Filter
>
Inherited from
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
>