Module models

Module models 

Source
Expand description

Models can be called by other crates, not just storage crate. They abstract away the process of querying the database. The actual query building all happens in the storage singleton service. The storage service holds any active session tokens to access the tenant databases. So, keeping the SQL isolated within the storage service prevents a different compromised process (for instance a runtime process) running arbitrary queries or accessing users’ data other than its own.

Modules§

graph
Represents a graph: user’s main local knowledge graph, other graphs of the user, graphs shared with the user, or general resource library graph.
graph_impl
Database query implementation for graph structures and node relationships.
node
Data transfer objects and types representing graph nodes and metadata.
node_impl
Database query implementation for node creation, updates, and indexing.
sync
Data structures and cryptographic models for client-to-server data backup.
sync_impl
Database query implementation for sync logs and remote replication state.
user
User management: creation, deletion, login, metadata. This tries to lock the user during write operations so it won’t end up in inconsistent states, etc. but that doesn’t currently seem to work reliably.
user_impl
Database query implementation for user accounts and permissions.