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 is undefined.

  • 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

Triggers updating full-text search index.

Parameters

No parameters

Example

inkdrop.main.dataStore.updateFTSIndex()
Can you help us improve the docs? 🙏

The source of these docs is here on GitHub. If you see a way these docs can be improved, please fork us!