Skip to content

Commit

Permalink
Merge pull request tecbot#170 from zjay1987/add-putlogdata-support
Browse files Browse the repository at this point in the history
Add PutLogData support for WriteBatch object
  • Loading branch information
tecbot authored Sep 24, 2019
2 parents db81abc + 8354395 commit 3aa0860
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions write_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ func (wb *WriteBatch) PutCF(cf *ColumnFamilyHandle, key, value []byte) {
C.rocksdb_writebatch_put_cf(wb.c, cf.c, cKey, C.size_t(len(key)), cValue, C.size_t(len(value)))
}

// Append a blob of arbitrary size to the records in this batch.
func (wb *WriteBatch) PutLogData(blob []byte) {
cBlob := byteToChar(blob)
C.rocksdb_writebatch_put_log_data(wb.c, cBlob, C.size_t(len(blob)))
}

// Merge queues a merge of "value" with the existing value of "key".
func (wb *WriteBatch) Merge(key, value []byte) {
cKey := byteToChar(key)
Expand Down

0 comments on commit 3aa0860

Please sign in to comment.