Data Store
The class in the main process for dealing with database and sync.
An instance of this class is always available as the inkdrop.main.dataStore
global.
Properties
- Name
localPouch
- Type
- PouchDB.Database
- Description
An instance of PouchDB associated with the local database. If the user is not logged in yet, it is
undefined
.
- Name
local
- Type
- InkdropDatabase
- Description
An instance of
InkdropDatabase
If the user is not logged in yet, it isundefined
.
- Name
sync
- Type
- InkdropDataSync
- Description
An instance of
InkdropDataSync
.
getLocalDB()
Get local database
Gets the local database instance.
Parameters
No parameters
Returns
Returns an instance of InkdropDatabase
.
Throws an error if it's not loaded yet.
Example
inkdrop.main.dataStore.getLocalDB()
updateFTSIndex()
Update FTS Index
Example
inkdrop.main.dataStore.updateFTSIndex()