diff --git a/db/c.cc b/db/c.cc index b881022e8..79776f4ea 100644 --- a/db/c.cc +++ b/db/c.cc @@ -1120,6 +1120,42 @@ void rocksdb_delete_cf_with_ts( Slice(key, keylen), Slice(ts, tslen))); } +void rocksdb_singledelete( + rocksdb_t* db, + const rocksdb_writeoptions_t* options, + const char* key, size_t keylen, + char** errptr){ + SaveError(errptr, db->rep->SingleDelete(options->rep, Slice(key, keylen))); +} + +void rocksdb_singledelete_cf( + rocksdb_t * db, + const rocksdb_writeoptions_t * options, + rocksdb_column_family_handle_t * column_family, + const char* key, size_t keylen, + char** errptr){ + SaveError(errptr, db->rep->SingleDelete(options->rep, column_family->rep, Slice(key, keylen))); +} + +void rocksdb_singledelete_with_ts( + rocksdb_t* db, + const rocksdb_writeoptions_t* options, + const char* key, size_t keylen, + const char* ts, size_t tslen, + char** errptr){ + SaveError(errptr, db->rep->SingleDelete(options->rep, Slice(key, keylen), Slice(ts, tslen))); +} + +void rocksdb_singledelete_cf_with_ts( + rocksdb_t * db, + const rocksdb_writeoptions_t * options, + rocksdb_column_family_handle_t * column_family, + const char* key, size_t keylen, + const char* ts, size_t tslen, + char** errptr){ + SaveError(errptr, db->rep->SingleDelete(options->rep, column_family->rep, Slice(key, keylen), Slice(ts, tslen))); +} + void rocksdb_increase_full_history_ts_low( rocksdb_t* db, rocksdb_column_family_handle_t* column_family, diff --git a/include/rocksdb/c.h b/include/rocksdb/c.h index 386d07464..bb2c5fe98 100644 --- a/include/rocksdb/c.h +++ b/include/rocksdb/c.h @@ -244,6 +244,34 @@ extern ROCKSDB_LIBRARY_API void rocksdb_delete_cf_with_ts( const char* ts, size_t tslen, char** errptr); +extern ROCKSDB_LIBRARY_API void rocksdb_singledelete( + rocksdb_t* db, + const rocksdb_writeoptions_t* options, + const char* key, size_t keylen, + char** errptr); + +extern ROCKSDB_LIBRARY_API void rocksdb_singledelete_cf( + rocksdb_t * db, + const rocksdb_writeoptions_t * options, + rocksdb_column_family_handle_t * column_family, + const char* key, size_t keylen, + char** errptr); + +extern ROCKSDB_LIBRARY_API void rocksdb_singledelete_with_ts( + rocksdb_t* db, + const rocksdb_writeoptions_t* options, + const char* key, size_t keylen, + const char* ts, size_t tslen, + char** errptr); + +extern ROCKSDB_LIBRARY_API void rocksdb_singledelete_cf_with_ts( + rocksdb_t * db, + const rocksdb_writeoptions_t * options, + rocksdb_column_family_handle_t * column_family, + const char* key, size_t keylen, + const char* ts, size_t tslen, + char** errptr); + extern ROCKSDB_LIBRARY_API void rocksdb_increase_full_history_ts_low( rocksdb_t* db, rocksdb_column_family_handle_t* column_family,