summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/leveldb/write_batch.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/leveldb/write_batch.h b/include/leveldb/write_batch.h
index b6d72cb..9386ace 100644
--- a/include/leveldb/write_batch.h
+++ b/include/leveldb/write_batch.h
@@ -54,6 +54,13 @@ class LEVELDB_EXPORT WriteBatch {
// releases. It is intended for LevelDB usage metrics.
size_t ApproximateSize();
+ // Copies the operations in "source" to this batch.
+ //
+ // This runs in O(source size) time. However, the constant factor is better
+ // than calling Iterate() over the source batch with a Handler that replicates
+ // the operations into this batch.
+ void Append(const WriteBatch& source);
+
// Support for iterating over the contents of a batch.
class Handler {
public: