DataBus
DataBus is the entry point of the whole DataBus abstraction.
An instance of DataBus is usually stored as a singleton. databusInstance.getDatabase() is used to get a Database, from which all kinds of resources can be fetched and manipulated.
Constructors
DataBus.create
DataBus.create(options: IDataBusInitOptions): DataBus)
Create a DataBus instance. An instance of DataBus is usually stored as a singleton.
The type of IDataBusInitOptions is:
export interface IDataBusInitOptions {
dataStorageProvider: IDataStorageProvider;
storeProvider: IStoreProvider;
}which requires the implementations of two providers, the data storage provider and the store provider.
Methods
getDatabase
getDatabase(): Database
Get an instance of Database. That instance will be used to obtain various resources and manipulate them.