Skip to content

Commit

Permalink
Add a way to set compaction filter in the C API
Browse files Browse the repository at this point in the history
  • Loading branch information
edsrzf committed Jun 19, 2014
1 parent df27013 commit d72313a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions db/c.cc
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,12 @@ void rocksdb_options_destroy(rocksdb_options_t* options) {
delete options;
}

void rocksdb_options_set_compaction_filter(
rocksdb_options_t* opt,
rocksdb_compactionfilter_t* filter) {
opt->rep.compaction_filter = filter;
}

void rocksdb_options_set_comparator(
rocksdb_options_t* opt,
rocksdb_comparator_t* cmp) {
Expand Down
3 changes: 3 additions & 0 deletions include/rocksdb/c.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ extern const char* rocksdb_writebatch_data(rocksdb_writebatch_t*, size_t *size);

extern rocksdb_options_t* rocksdb_options_create();
extern void rocksdb_options_destroy(rocksdb_options_t*);
extern void rocksdb_options_set_compaction_filter(
rocksdb_options_t*,
rocksdb_compactionfilter_t*);
extern void rocksdb_options_set_comparator(
rocksdb_options_t*,
rocksdb_comparator_t*);
Expand Down

0 comments on commit d72313a

Please sign in to comment.