mafintosh / hyperdb

Distributed scalable database
MIT License
753 stars 75 forks source link

I cannot delete a key #26

Closed e-e-e closed 6 years ago

e-e-e commented 6 years ago

@mafintosh I am excited to finally have started to play around with hyperdb. It's fun.

I have begun to write a simple graph database on top of it (using levelgraph's triple store spec as a starting point - https://github.com/e-e-e/hyperdb-graph). Although I have almost immediately hit the problem that delete is not implemented yet in hyperdb. On the plus side - I have gotten hyperdb-graph passing almost all the core triple store tests - excluding deletion and levelgraphs filtering options.

Also - It looks like hyberdb.batch() ignores the type property entirely and just call the put method - https://github.com/mafintosh/hyperdb/blob/master/index.js#L94. Is the intention that in the future we will be able to specify del as a valid type? Or should I not rely on this for now.

Whats the plans for implementing deletion generally - anything I can do to help?

hackergrrl commented 6 years ago

I think @mafintosh is working on deletions for v2.

e-e-e commented 6 years ago

@noffle - I just realised that this is not a real issue. Obviously there can be no real deletions as we are dealing with append only logs. So I managed to implement delete just by putting null values. Then when reading back from stream its just a matter of checking if the latest node for that key has a value of null. If so - that key has been deleted.

You can close this issue, unless @mafintosh wants to track the feature still.

mafintosh commented 6 years ago

deletes are in master