Skip to main content

branch_get

Function branch_get 

Source
pub fn branch_get(db: &Db, branch: &str, coll: &str, id: &str) -> Option<Value>
Expand description

Read a document as the branch sees it: the branch’s own write if it has one, otherwise the PARENT AS OF THE FORK POINT.

This is the read-through, and the fall-through target is base_seq rather than the parent tip on purpose. A branch that saw the parent’s later writes would have no stable base to three-way merge against — its own “unchanged” side would keep moving.