diff options
Diffstat (limited to 'vendor/gitea.com/lunny/nodb/store/goleveldb/batch.go')
-rw-r--r-- | vendor/gitea.com/lunny/nodb/store/goleveldb/batch.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/vendor/gitea.com/lunny/nodb/store/goleveldb/batch.go b/vendor/gitea.com/lunny/nodb/store/goleveldb/batch.go deleted file mode 100644 index b17e85e750..0000000000 --- a/vendor/gitea.com/lunny/nodb/store/goleveldb/batch.go +++ /dev/null @@ -1,27 +0,0 @@ -package goleveldb - -import ( - "github.com/syndtr/goleveldb/leveldb" -) - -type WriteBatch struct { - db *DB - wbatch *leveldb.Batch -} - -func (w *WriteBatch) Put(key, value []byte) { - w.wbatch.Put(key, value) -} - -func (w *WriteBatch) Delete(key []byte) { - w.wbatch.Delete(key) -} - -func (w *WriteBatch) Commit() error { - return w.db.db.Write(w.wbatch, nil) -} - -func (w *WriteBatch) Rollback() error { - w.wbatch.Reset() - return nil -} |