@pod-os/core / Store
Class: Store
Defined in: Store.ts:29
The internalStore contains all data that is known locally. It can be used to fetch additional data from the web and also update data and sync it back to editable resources.
Constructors
Constructor
new Store(
session,offlineCache,onlineStatus,internalStore):Store
Defined in: Store.ts:33
Parameters
session
offlineCache
OfflineCache = ...
onlineStatus
OnlineStatus = ...
internalStore
IndexedFormula = ...
Returns
Store
Methods
addNewThing()
addNewThing(
uri,name,type):Promise\<void>
Defined in: Store.ts:106
Parameters
uri
string
name
string
type
string
Returns
Promise\<void>
addPropertyValue()
addPropertyValue(
thing,property,value):Promise\<void>
Defined in: Store.ts:88
Adds a new value to the property of the given thing
Parameters
thing
property
string
value
string
Returns
Promise\<void>
executeUpdate()
executeUpdate(
operation):Promise\<void>
Defined in: Store.ts:133
Parameters
operation
UpdateOperation
Returns
Promise\<void>
fetch()
fetch(
uri):Promise\<Response>
Defined in: Store.ts:51
Fetch data for the given URI to the internalStore
Parameters
uri
string
Returns
Promise\<Response>
fetchAll()
fetchAll(
uris):Promise\<PromiseSettledResult\<Response>[]>
Defined in: Store.ts:68
Fetch all the given URIs in parallel and put the data to the internalStore
Parameters
uris
string[]
Returns
Promise\<PromiseSettledResult\<Response>[]>
flagAuthorizationMetadata()
flagAuthorizationMetadata():
void
Defined in: Store.ts:137
Returns
void
get()
get(
uri):Thing
Defined in: Store.ts:77
Retrieve the thing identified by the given URI from the internalStore
Parameters
uri
string
Returns
loadModule()
loadModule\<
T>(module):T
Defined in: Store.ts:141
Type Parameters
T
T
Parameters
module
PodOsModule\<T>
Returns
T