Data Store Service
The Data Store Service creates a local database, which users can create, fetch, and delete stores using categories. Data Store Service uses the Data Store Object for managing data.
Methods
getAllData()
Description
This gets all the stores from all the categories from the data store service.
Return Value: Object
- Returns a object of stores.
Code Example
this.allStores = digideckCore.dataStoreService.getAllData();
getStore(category)
Return Value: Data Store
- Returns a Data Store of type category if the store already exists.
- Creates and returns a Data Store of type category if store doesn't exist.
Options:
category: Stringthe category used to reference the store.
Code Example
// returns a store of category bikes
this.store = digideckCore.dataStoreService.getStore('bikes');
deleteStore(category)
Return Value: null
- Deletes a data store of type category.
Options:
category: Stringcategory reference of the store to be deleted.
Code Example
// deletes a store of category bikes
this.store = digideckCore.dataStoreService.deleteStore('bikes');