Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ComponentDatabaseMapOptions<DBSchema, StoreName>

The options for ComponentDatabaseMap.

Type parameters

Hierarchy

  • ComponentDatabaseMapOptions

Index

Properties

Properties

key

key: StoreKey<DBSchema["schema"], StoreName> | (() => StoreKey<DBSchema["schema"], StoreName>)

The key in ComponentDatabaseMapOptions.storeName to fetch and update, or an object describing how to fetch that key from the Database.

key.tx is called inside a Database.transaction, so all the warnings there apply.

Optional property

property: keyof PickStoreValueProperties<StoreValue<DBSchema["schema"], StoreName>> extends never ? never : keyof PickStoreValueProperties<StoreValue<DBSchema["schema"], StoreName>> | StoreValuePropertyPath<StoreValue<DBSchema["schema"], StoreName>>

The name of the property of the value in the Store to fetch and update.

If the target property is below the base level, pass in an array describing the "path" to that property. For example, if you would reference the property directly by value["a"]["b"], then set this to ["a", "b"] to have the same effect.

Leave this blank to fetch and update the entire value directly, for example, if you're storing primitives in this Store.

storeName

storeName: StoreName

The name of the Database store to fetch and update.

Generated using TypeDoc