Closed vweevers closed 2 years ago
Very nice. I especially like the subleveldown feature, like emptying a bucket of stuff.
Relevant leveldown
issue: https://github.com/Level/leveldown/issues/9.
Ah, the level-concat-iterator
dependency comes in handy for the default implementation of _clear
:)
Ah, the level-concat-iterator dependency comes in handy for the default implementation of _clear :)
Good. Then we don't have to feel so bad about including it :wink:
Ah, the level-concat-iterator dependency comes in handy for the default implementation of _clear :)
Scratch that. Would choke on many keys.
Because abstract-leveldown@6.1.0
now has a clear()
method, I'm moving this issue to community
to track overall progress.
Background: https://github.com/Level/abstract-leveldown/pull/24#issuecomment-397760287.
Phase 1: get it working
clear()
deletes entries with an iterator. It can take range options, e.g.clear({ gt: 'foo' })
and should serialize them6.1.0
encoding-down
can callthis.db.clear()
and should encode the range options6.2.0
leveldown
5.2.0
deferred-leveldown
should defer it5.2.0
levelup
4.2.0
memdown
level-packager
(bump dependencies to prevent dedupe)5.0.3
level-js
level
level-mem
(bump dependencies to prevent dedupe)5.0.1
rocksdb
level-rocksdb
(bump dependencies to prevent dedupe)subleveldown
uses the range options to implementclear
on a sublevelmultileveldown
(and by extension,level-party
)(slated to be deprecated)leveldown-hyper
andlevel-hyper
Phase 2: optimize
memdown
: https://github.com/Level/memdown/pull/213leveldown
can implement it natively (https://github.com/Level/leveldown/issues/680)rocksdb
: https://github.com/Level/rocksdb/pull/184 (5.2.0)level-js
can call eitherIDBObjectStore#clear()
orIDBObjectStore#delete(range)
On the side
Use it in(old)mafintosh/level-temp
Add notice to(old)Raynos/level-delete-range
Send PR tonoffle/kappa-view-level
for itsclearIndex()