digidem / osm-p2p-db

Peer-to-peer database for OpenStreetMap data
BSD 2-Clause "Simplified" License
237 stars 25 forks source link

[WIP] Store an optional value on doc deletions. #46

Open hackergrrl opened 7 years ago

hackergrrl commented 7 years ago

This is ready for another look-over. Here's the gist:

  1. Writing deletions: starting at osm.del(), the deletion values are threaded through into _getDocumentDeletionBatchOp(), which generates a new batch op structure to be passed into osm.batch(), which in turn get fed into kv.batch().
  2. Exposing values on deletions: look in osm.get() and addDocFromNode() in _collectNodeAndReferers().