Implement db#clear across the board
vweevers opened this issue · 6 comments
Background: Level/abstract-leveldown#24 (comment).
Phase 1: get it working
- The default implementation of
clear()
deletes entries with an iterator. It can take range options, e.g.clear({ gt: 'foo' })
and should serialize them- PR: Level/abstract-leveldown#310
- Release:
6.1.0
-
encoding-down
can callthis.db.clear()
and should encode the range options- PR: Level/encoding-down#89)
- Release:
6.2.0
-
leveldown
- PR: Level/leveldown#660
- Release:
5.2.0
-
deferred-leveldown
should defer it- PR: Level/deferred-leveldown#72
- Release:
5.2.0
-
levelup
- PR: Level/levelup#669
- Release:
4.2.0
-
memdown
- PR: Level/memdown#194
- Release: 5.0.0
-
level-packager
(bump dependencies to prevent dedupe)- Commit: Level/packager@a293d30
- Release:
5.0.3
-
level-js
- PR: Level/level-js#182
- Release: 5.0.0
-
level
- PR or commit: Level/level#162, Level/level@5efdc82
- Release: 6.0.0
-
level-mem
(bump dependencies to prevent dedupe)- Commit: Level/mem@baec173
- Release:
5.0.1
-
rocksdb
- Commit: Level/rocksdb@b9d58fb
- Release: 4.1.0
-
level-rocksdb
(bump dependencies to prevent dedupe) -
subleveldown
uses the range options to implementclear
on a sublevel- PR: Level/subleveldown#74
- Release: 4.1.2
-
multileveldown
(and by extension,level-party
)- Level/multileveldown@47e0137
- Release: 5.0.0
-
(slated to be deprecated)leveldown-hyper
andlevel-hyper
Phase 2: optimize
-
memdown
: Level/memdown#213 -
leveldown
can implement it natively (Level/leveldown#680) -
rocksdb
: Level/rocksdb#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
- juliangruber/level-delete-stream#3
-
Send PR tonoffle/kappa-view-level
for itsclearIndex()
Very nice. I especially like the subleveldown feature, like emptying a bucket of stuff.
Relevant leveldown
issue: Level/leveldown#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 😉
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.