Private
_activePrivate
_memoryPrivate
Readonly
_nonGet all entities from a collection.
The store should filter out any entities with the property deleted: true
.
The type of data to be accessed. The store should not make any assumptions about the format
of the data, but just return an object in which each key is the key
property of an entity
and the value is the entity. The actual type of this parameter is
interfaces.DataKind.
Will be called with the resulting map. The actual type of the result value is
interfaces.KeyedItems<VersionedData>
.
Applies the provided data onto the existing data, replacing all data or upserting depending on the basis parameter. Must call applyChanges providing basis before calling applyChanges that is not a basis.
If true, completely overwrites the current contents of the data store with the provided data. If false, upserts the items in the provided data. Upserts are made only if provided items have newer versions than existing items.
An object in which each key is the "namespace" of a collection (e.g. "features"
) and
the value is an object that maps keys to entities. The actual type of this parameter is
interfaces.FullDataSet<VersionedData>
.
Will be called after the changes are applied.
Optional
_initMetadata: InitMetadataOptional metadata to initialize the feature store with.
Optional
Optional
_selector: Stringopaque string that uniquely identifies the state that contains the changes
Optional
Delete an entity from the store.
Deletion should be implemented by storing a placeholder object with the property
deleted: true
and a version
property equal to the provided version. In other words,
it should be exactly the same as calling upsert
with such an object.
The type of data to be accessed. The actual type of this parameter is interfaces.DataKind.
The unique key of the entity within the specified collection.
A number that must be greater than the version
property of the existing entity in
order for it to be deleted. If it is less than or equal to the existing version, the
method should do nothing.
Will be called when the delete operation is complete.
Get an entity from the store.
The store should treat any entity with the property deleted: true
as "not found".
The type of data to be accessed. The store should not make any assumptions about the format of the data, but just return a JSON object. The actual type of this parameter is interfaces.DataKind.
The unique key of the entity within the specified collection.
Will be called with the retrieved entity, or null if not found. The actual type of the result value is interfaces.VersionedData.
Initialize the store, overwriting any existing data.
An object in which each key is the "namespace" of a collection (e.g. "features"
) and
the value is an object that maps keys to entities. The actual type of this parameter is
interfaces.FullDataSet<VersionedData>
.
Will be called when the store has been initialized.
Tests whether the store is initialized.
"Initialized" means that the store has been populated with data, either by the client
having called init()
within this process, or by another process (if this is a shared
database).
Will be called back with the boolean result.
Add an entity or update an existing entity.
The type of data to be accessed. The actual type of this parameter is interfaces.DataKind.
The contents of the entity, as an object that can be converted to JSON. The store
should check the version
property of this object, and should not overwrite any
existing data if the existing version
is greater than or equal to that value.
The actual type of this parameter is interfaces.VersionedData.
Will be called after the upsert operation is complete.
Generated using TypeDoc
This decorator can take a non-transactional LDFeatureStore implementation and adapt it to be transactional through the use of an in-memory store acting as cache.