Design¶
Entities¶
BaseEntity is the base class representing notes, attributes, and branches. It essentially maps to a record in Trilium’s database.
Entity state machine¶
The entity state (BaseEntity.state) is automatically managed based on the user’s actions. The following illustrates the possible state transitions.
Flush procedure¶
The following captures the mechanism to commit changes to Trilium, beginning with Session.flush.
It’s recommended to right click and “Open image in new tab”.