From 735df66552596dce6d8ad2873c20ce6e3acbb832 Mon Sep 17 00:00:00 2001 From: Reed Allman Date: Wed, 10 Jun 2015 00:12:33 -0700 Subject: [PATCH] C: add WriteBatch.PutLogData support --- db/c.cc | 6 ++++++ include/rocksdb/c.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/db/c.cc b/db/c.cc index 7a9282991..fbf2c4ef0 100644 --- a/db/c.cc +++ b/db/c.cc @@ -1266,6 +1266,12 @@ void rocksdb_writebatch_deletev_cf( b->rep.Delete(column_family->rep, SliceParts(key_slices.data(), num_keys)); } +void rocksdb_writebatch_put_log_data( + rocksdb_writebatch_t* b, + const char* blob, size_t len) { + b->rep.PutLogData(Slice(blob, len)); +} + void rocksdb_writebatch_iterate( rocksdb_writebatch_t* b, void* state, diff --git a/include/rocksdb/c.h b/include/rocksdb/c.h index a95f2f97d..06cf65bd1 100644 --- a/include/rocksdb/c.h +++ b/include/rocksdb/c.h @@ -459,6 +459,9 @@ void rocksdb_writebatch_deletev_cf( rocksdb_column_family_handle_t* column_family, int num_keys, const char* const* keys_list, const size_t* keys_list_sizes); +extern void rocksdb_writebatch_put_log_data( + rocksdb_writebatch_t*, + const char* blob, size_t len); extern void rocksdb_writebatch_iterate( rocksdb_writebatch_t*, void* state,