Interface: ReactiveDatabaseOptions<ObjectMap>
The shape of the configuration options object for the ReactiveDatabase.
Type Parameters
| Type Parameter | Default type |
|---|---|
ObjectMap extends Record<string, PlainObject> | DefaultObjectMap |
Properties
| Property | Type | Description |
|---|---|---|
hooks? | { wrapReactiveModel: WrapReactiveModelHook<ObjectMap[StringKeyOf<ObjectMap>], Extract<keyof ObjectMap[StringKeyOf<ObjectMap>], string>, Record<string, RelationshipConfiguration>>; wrapReactiveQueryCollection: WrapReactiveQueryCollectionHook<ObjectMap[StringKeyOf<ObjectMap>], Extract<keyof ObjectMap[StringKeyOf<ObjectMap>], string>, Record<string, RelationshipConfiguration>, any>; wrapReactiveQueryResult: WrapReactiveQueryResultHook<ObjectMap[StringKeyOf<ObjectMap>], Extract<keyof ObjectMap[StringKeyOf<ObjectMap>], string>, Record<string, RelationshipConfiguration>, any>; } | Optional hooks for wrapping returned instances for integration with reactive frameworks. |
hooks.wrapReactiveModel? | WrapReactiveModelHook<ObjectMap[StringKeyOf<ObjectMap>], Extract<keyof ObjectMap[StringKeyOf<ObjectMap>], string>, Record<string, RelationshipConfiguration>> | Hook to wrap every ReactiveModel instance before returning to the user. |
hooks.wrapReactiveQueryCollection? | WrapReactiveQueryCollectionHook<ObjectMap[StringKeyOf<ObjectMap>], Extract<keyof ObjectMap[StringKeyOf<ObjectMap>], string>, Record<string, RelationshipConfiguration>, any> | Hook to wrap every ReactiveQueryCollection instance before returning to the user. |
hooks.wrapReactiveQueryResult? | WrapReactiveQueryResultHook<ObjectMap[StringKeyOf<ObjectMap>], Extract<keyof ObjectMap[StringKeyOf<ObjectMap>], string>, Record<string, RelationshipConfiguration>, any> | Hook to wrap every ReactiveQueryResult instance before returning to the user. |
initial | ReactiveDatabaseInitialOptions | The initial configuration options for the ReactiveDatabase. |
models | { [K in string]: ReactiveDatabaseModelDefinition<ObjectMap[K]> } | A map which contains the schema definitions for the models which will be created over the Dexie stores |
namespace | string | The current database version number |
psk | string | The pre-shared key used to encrypt and decrypt values as they are passed between contexts Remarks This key should be at least 16 characters long, but it should not be considered "secure" since it is available to anyone who decides to dig deep enough into your code base. |
version | number | The current database version number |