Open RangerMauve opened 6 months ago
It'd be useful to have an easy way to move entries to new locations. At the moment one needs to either duplicate data and delete the old data in a batch, or mess with internal APIs.
I propose something like this:
async rename(src, dst) { const entry = await this.entry(src) const batch = this.db.batch() batch.del(src) batch.put(dst, entry) batch.flush() }
Would a PR that adds a working method as well as unit tests work for y'all?
It'd be useful to have an easy way to move entries to new locations. At the moment one needs to either duplicate data and delete the old data in a batch, or mess with internal APIs.
I propose something like this:
Would a PR that adds a working method as well as unit tests work for y'all?