Add SingleDelete in C API

This commit is contained in:
muthukrishnan.s 2022-05-15 08:59:30 +05:30
parent 15f95d6d63
commit 55a074acc1
2 changed files with 64 additions and 0 deletions

36
db/c.cc
View File

@ -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,

View File

@ -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,