Sqlite

Quickstart

Architecture

Store initialization Diagram

NOTE: this is implemented for enginev2. it has not yet been implemented for enginev3

stateDiagram-v2 state sqlDependenciesState <<choice>> state sqlFileState <<choice>> state notesSyncedState <<choice>> [*] --> init init --> sqlDependenciesPresent? sqlDependenciesPresent? --> sqlDependenciesState sqlDependenciesState --> downloadSQLDependencies : if false downloadSQLDependencies --> sqliteFilePresent? sqlDependenciesState --> sqliteFilePresent? : if true sqliteFilePresent? --> sqlFileState sqlFileState --> createFileAndTables : if false createFileAndTables --> parseNotes sqlFileState --> parseNotes : if true parseNotes --> notesSyncedBefore? notesSyncedBefore? --> notesSyncedState notesSyncedState --> syncAllNotes : if false notesSyncedState --> syncUpdatedNotes: if true syncAllNotes --> [*] syncUpdatedNotes --> [*]

Code Flow

  • How enginev2 initializes with SQLite: Init

Relevant Files

Dependencies

Details

Download Binaries

If prisma binaries aren't in place and sqlite is enabled, Dendron will download them to ~/.dendron/. Some implementation details to consider:

Cookbook

Check if SQLite is enabled

  • you can verify that sqlite is enabled by checking for some of the following cues:
    • metadata.db exists in your workspace root
    • checking for the following in dendron.server.log: checking if sql is initialized...
      • this will only print if sqlite is enabled
      • NOTE: this won't be available when developing because we don't output the dendron.server.log file in the dev environment