Skip to content

Interface: ReactiveDatabaseOptions<ObjectMap>

The shape of the configuration options object for the ReactiveDatabase.

Type Parameters

Type ParameterDefault type
ObjectMap extends Record<string, PlainObject>DefaultObjectMap

Properties

PropertyTypeDescription
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.
initialReactiveDatabaseInitialOptionsThe 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
namespacestringThe current database version number
pskstringThe 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.
versionnumberThe current database version number