- Cypher
- Python SDK
Lazy Commit Loading
TuringDB lazily loads commits from disk. When a graph is loaded, only the HEAD commit (the latest commit on the current branch) is fully loaded into memory. All other commits are registered but their data remains on disk until explicitly requested. This means that to query a past commit, its data must first be loaded into memory using theLOAD COMMIT command:
When do I need
LOAD COMMIT?- TuringDB CLI: The
checkoutcommand automatically loads the commit for you — no need to callLOAD COMMITmanually. - Python SDK:
client.checkout()automatically loads the commit for you — no need to callLOAD COMMITmanually. - REST API (
/queryendpoint): If you send Cypher queries directly to the/queryendpoint, you must callLOAD COMMIT '<hash>'explicitly before querying any commit that is not the HEAD commit at startup time.
Example: Querying a Past Commit via the REST API
LOAD COMMIT is idempotent — calling it on an already-loaded commit is a no-op and returns immediately.
