-
-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Labels
Description
What about this API for snapshots
db#snapshot()
Create a new snapshot.
snapshot#get(key, value[, opts])
Read a single value from a snapshot.
snapshot#create{Read,Key,Value}Stream
Read multiple values from a snapshot.
snapshot#dispose()
Delete the snapshot.
Maybe also:
snapshot#{del,createWriteStream,...}
Just forwarded to db#*
Usage
For a consistend read stream this would be:
var snapshot() = db.snapshot();
snapshot.createReadStream()
.pipe(...)
.on('close', shapshot.dispose.bind(snapshot));