StoreConfig

open class StoreConfig

Class encapsulating a SmartStore schema (soups). Config expected in a resource or assets file in JSON with the following: { soups: [ { soupName: xxx indexes: [ { path: xxx type: xxx } ] } ] }

Constructors

Link copied to clipboard
constructor(ctx: Context, resourceId: Int)
Constructor for config stored in resource file
constructor(ctx: Context, assetPath: String)
Constructor for config stored in asset file

Properties

Link copied to clipboard
val INDEXES: String = "indexes"
Link copied to clipboard
val SOUP_NAME: String = "soupName"
Link copied to clipboard
val SOUPS: String = "soups"

Functions

Link copied to clipboard
open fun hasSoups(): Boolean
Return true if soups are defined in config
Link copied to clipboard
open fun registerSoups(store: SmartStore)
Register the soup from the config in the given store NB: only feedback is through the logs - the config is static so getting it right is something the developer should do while writing the app