DBCore
DBCore is a middleware-approach for Dexie that is superior to the hooks API. These are the reasons it is superior to the hooks API:
It allows the injector to perform asynchronous actions before forwarding a call.
It allows the injector to take actions both before and after the forwarded call.
It covers more use cases, such as when a transaction is created, allow custom index proxies etc.
From Dexie 3.0, all runtime calls to IndexedDB go via DBCore. The hooks API is still there and backward compatible with Dexie 2.0, but its internal implementation is now done using a DBCore middleware.
Not all access to IndexedDB go via DBCore still. Upgrade handling and opening the database are performed directly towards the provided IndexedDB implementation which defaults to global.indexedDB. In a future version, also these calls may become intercepted by a similar middleware architecture.
Purpose
Be able to invoke middleware
Be performant and bulk-oriented
Non-purpose
Be a totally database-agnostic API
Definition
See Dexie.use()
See Also
DBCoreTransaction
DBCoreSchema
DBCoreTable
DBCoreQuery
Example
See Dexie.use()#example