Skip to content

Commit 3aa0860

Browse files
authored
Merge pull request #170 from zjay1987/add-putlogdata-support
Add PutLogData support for WriteBatch object
2 parents db81abc + 8354395 commit 3aa0860

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

write_batch.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ func (wb *WriteBatch) PutCF(cf *ColumnFamilyHandle, key, value []byte) {
4141
C.rocksdb_writebatch_put_cf(wb.c, cf.c, cKey, C.size_t(len(key)), cValue, C.size_t(len(value)))
4242
}
4343

44+
// Append a blob of arbitrary size to the records in this batch.
45+
func (wb *WriteBatch) PutLogData(blob []byte) {
46+
cBlob := byteToChar(blob)
47+
C.rocksdb_writebatch_put_log_data(wb.c, cBlob, C.size_t(len(blob)))
48+
}
49+
4450
// Merge queues a merge of "value" with the existing value of "key".
4551
func (wb *WriteBatch) Merge(key, value []byte) {
4652
cKey := byteToChar(key)

0 commit comments

Comments
 (0)