From 17dc8a74497d3fee933592ef860275e6b0dd71d6 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Sun, 3 Dec 2017 21:44:48 -0800 Subject: [PATCH] SetDeleter/Batch separation --- db/db.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db/db.go b/db/db.go index e86394713..08ebaeaac 100644 --- a/db/db.go +++ b/db/db.go @@ -27,9 +27,13 @@ type CacheDB interface { Write() // Write to the underlying DB } -type Batch interface { +type SetDeleter interface { Set(key, value []byte) Delete(key []byte) +} + +type Batch interface { + SetDeleter Write() }