@ -117,7 +117,9 @@ struct rocksdb_flushoptions_t { FlushOptions rep; };
struct rocksdb_fifo_compaction_options_t { CompactionOptionsFIFO rep ; } ;
struct rocksdb_readoptions_t {
ReadOptions rep ;
Slice upper_bound ; // stack variable to set pointer to in ReadOptions
// stack variables to set pointers to in ReadOptions
Slice upper_bound ;
Slice lower_bound ;
} ;
struct rocksdb_writeoptions_t { WriteOptions rep ; } ;
struct rocksdb_options_t { Options rep ; } ;
@ -2728,6 +2730,18 @@ void rocksdb_readoptions_set_iterate_upper_bound(
}
}
void rocksdb_readoptions_set_iterate_lower_bound (
rocksdb_readoptions_t * opt ,
const char * key , size_t keylen ) {
if ( key = = nullptr ) {
opt - > lower_bound = Slice ( ) ;
opt - > rep . iterate_lower_bound = nullptr ;
} else {
opt - > lower_bound = Slice ( key , keylen ) ;
opt - > rep . iterate_lower_bound = & opt - > lower_bound ;
}
}
void rocksdb_readoptions_set_read_tier (
rocksdb_readoptions_t * opt , int v ) {
opt - > rep . read_tier = static_cast < rocksdb : : ReadTier > ( v ) ;
@ -2738,11 +2752,21 @@ void rocksdb_readoptions_set_tailing(
opt - > rep . tailing = v ;
}
void rocksdb_readoptions_set_managed (
rocksdb_readoptions_t * opt , unsigned char v ) {
opt - > rep . managed = v ;
}
void rocksdb_readoptions_set_readahead_size (
rocksdb_readoptions_t * opt , size_t v ) {
opt - > rep . readahead_size = v ;
}
void rocksdb_readoptions_set_prefix_same_as_start (
rocksdb_readoptions_t * opt , unsigned char v ) {
opt - > rep . prefix_same_as_start = v ;
}
void rocksdb_readoptions_set_pin_data ( rocksdb_readoptions_t * opt ,
unsigned char v ) {
opt - > rep . pin_data = v ;
@ -2753,6 +2777,22 @@ void rocksdb_readoptions_set_total_order_seek(rocksdb_readoptions_t* opt,
opt - > rep . total_order_seek = v ;
}
void rocksdb_readoptions_set_max_skippable_internal_keys (
rocksdb_readoptions_t * opt ,
uint64_t v ) {
opt - > rep . max_skippable_internal_keys = v ;
}
void rocksdb_readoptions_set_background_purge_on_iterator_cleanup (
rocksdb_readoptions_t * opt , unsigned char v ) {
opt - > rep . background_purge_on_iterator_cleanup = v ;
}
void rocksdb_readoptions_set_ignore_range_deletions (
rocksdb_readoptions_t * opt , unsigned char v ) {
opt - > rep . ignore_range_deletions = v ;
}
rocksdb_writeoptions_t * rocksdb_writeoptions_create ( ) {
return new rocksdb_writeoptions_t ;
}
@ -2770,6 +2810,24 @@ void rocksdb_writeoptions_disable_WAL(rocksdb_writeoptions_t* opt, int disable)
opt - > rep . disableWAL = disable ;
}
void rocksdb_writeoptions_set_ignore_missing_column_families (
rocksdb_writeoptions_t * opt ,
unsigned char v ) {
opt - > rep . ignore_missing_column_families = v ;
}
void rocksdb_writeoptions_set_no_slowdown (
rocksdb_writeoptions_t * opt ,
unsigned char v ) {
opt - > rep . no_slowdown = v ;
}
void rocksdb_writeoptions_set_low_pri (
rocksdb_writeoptions_t * opt ,
unsigned char v ) {
opt - > rep . low_pri = v ;
}
rocksdb_compactoptions_t * rocksdb_compactoptions_create ( ) {
return new rocksdb_compactoptions_t ;
}