Skip to content

Commit

Permalink
Add rocksdb_property_int_cf
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdplm committed Apr 30, 2019
1 parent 1886456 commit 8cbafee
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions db/c.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,18 @@ int rocksdb_property_int(
}
}

int rocksdb_property_int_cf(
rocksdb_t* db,
rocksdb_column_family_handle_t* column_family,
const char* propname,
uint64_t *out_val) {
if (db->rep->GetIntProperty(column_family->rep, (propname), out_val)) {
return 0;
} else {
return -1;
}
}

char* rocksdb_property_value_cf(
rocksdb_t* db,
rocksdb_column_family_handle_t* column_family,
Expand Down
5 changes: 5 additions & 0 deletions include/rocksdb/c.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ int rocksdb_property_int(
rocksdb_t* db,
const char* propname, uint64_t *out_val);

/* returns 0 on success, -1 otherwise */
int rocksdb_property_int_cf(
rocksdb_t* db, rocksdb_column_family_handle_t* column_family,
const char* propname, uint64_t *out_val);

extern ROCKSDB_LIBRARY_API char* rocksdb_property_value_cf(
rocksdb_t* db, rocksdb_column_family_handle_t* column_family,
const char* propname);
Expand Down

0 comments on commit 8cbafee

Please sign in to comment.