Skip to main content

collect_relation_updates

Function collect_relation_updates 

Source
pub fn collect_relation_updates(body: &mut WriteBody) -> Vec<RelationUpdate>
Expand description

Strip AddRelation and RemoveRelation out of a write body, including inside a Batch.

collectRelationUpdates (DatabaseController.js:732-765). Note that a Batch containing a relation op removes the whole key from the write, so a batch mixing a relation op with anything else loses the rest. That is upstream’s deleteMe.push(key) and it is reproduced.