func (o *Options) SetKeepLogFileNum(value int) {
	C.rocksdb_options_set_keep_log_file_num(o.c, C.size_t(value))
}
SetKeepLogFileNum sets the maximal info log files to be kept.
Default: 1000
package rocksdb
import "C"
import "unsafe"
type CompressionType uint
const (
	NoCompression     = CompressionType(C.rocksdb_no_compression)
	SnappyCompression = CompressionType(C.rocksdb_snappy_compression)
)
type Options struct {
	c *C.rocksdb_options_t
	env  *Env
	bbto *BlockBasedTableOptions
	cst  *C.rocksdb_slicetransform_t
}
func NewDefaultOptions() *Options {
	return &Options{c: C.rocksdb_options_create()}
}
func (o *Options) SetCreateIfMissing(value bool) {
	C.rocksdb_options_set_create_if_missing(o.c, boolToUchar(value))
}
func (o *Options) SetEnv(value *Env) {
	o.env = value
	C.rocksdb_options_set_env(o.c, value.c)
}
func (o *Options) IncreaseParallelism(totalThreads int) {
	C.rocksdb_options_increase_parallelism(o.c, C.int(totalThreads))
}
func (o *Options) SetMaxWriteBufferNumber(value int) {
	C.rocksdb_options_set_max_write_buffer_number(o.c, C.int(value))
}
func (o *Options) SetMinWriteBufferNumberToMerge(value int) {
	C.rocksdb_options_set_min_write_buffer_number_to_merge(o.c, C.int(value))
}
func (o *Options) SetMaxOpenFiles(value int) {
	C.rocksdb_options_set_max_open_files(o.c, C.int(value))
}
func (o *Options) SetMaxFileOpeningThreads(value int) {
	C.rocksdb_options_set_max_file_opening_threads(o.c, C.int(value))
}
func (o *Options) OptimizeForPointLookup(blockCacheSizeMb uint64) {
	C.rocksdb_options_optimize_for_point_lookup(o.c, C.uint64_t(blockCacheSizeMb))
}
func (o *Options) SetAllowConcurrentMemtableWrites(allow bool) {
	C.rocksdb_options_set_allow_concurrent_memtable_write(o.c, boolToUchar(allow))
}
func (o *Options) SetMemtableVectorRep() {
	C.rocksdb_options_set_memtable_vector_rep(o.c)
}
func (o *Options) SetHashSkipListRep(bucketCount int, skiplistHeight, skiplistBranchingFactor int32) {
	C.rocksdb_options_set_hash_skip_list_rep(o.c, C.size_t(bucketCount), C.int32_t(skiplistHeight), C.int32_t(skiplistBranchingFactor))
}
func (o *Options) SetHashLinkListRep(bucketCount int) {
	C.rocksdb_options_set_hash_link_list_rep(o.c, C.size_t(bucketCount))
}
func (o *Options) SetBlockBasedTableFactory(value *BlockBasedTableOptions) {
	o.bbto = value
	C.rocksdb_options_set_block_based_table_factory(o.c, value.c)
}
func (o *Options) SetPlainTableFactory(keyLen uint32, bloomBitsPerKey int, hashTableRatio float64, indexSparseness int) {
	C.rocksdb_options_set_plain_table_factory(o.c, C.uint32_t(keyLen), C.int(bloomBitsPerKey), C.double(hashTableRatio), C.size_t(indexSparseness))
}
func (o *Options) SetCreateIfMissingColumnFamilies(value bool) {
	C.rocksdb_options_set_create_missing_column_families(o.c, boolToUchar(value))
}
func (o *Options) SetPrefixExtractor(st SliceTransform) {
	if nst, ok := st.(nativeSliceTransform); ok {
		o.cst = nst.c
	} else {
		idx := registerSliceTransform(st)
		o.cst = C.rocksdb_slicetransform_create_ext(C.uintptr_t(idx))
	}
	C.rocksdb_options_set_prefix_extractor(o.c, o.cst)
}
func (o *Options) SetCompression(value CompressionType) {
	C.rocksdb_options_set_compression(o.c, C.int(value))
}
func (o *Options) SetNumLevels(value int) {
	C.rocksdb_options_set_num_levels(o.c, C.int(value))
}
func (o *Options) SetLevel0FileNumCompactionTrigger(value int) {
	C.rocksdb_options_set_level0_file_num_compaction_trigger(o.c, C.int(value))
}
func (o *Options) SetLevel0SlowdownWritesTrigger(value int) {
	C.rocksdb_options_set_level0_slowdown_writes_trigger(o.c, C.int(value))
}
func (o *Options) SetLevel0StopWritesTrigger(value int) {
	C.rocksdb_options_set_level0_stop_writes_trigger(o.c, C.int(value))
}
func (o *Options) SetMaxBytesForLevelBase(value uint64) {
	C.rocksdb_options_set_max_bytes_for_level_base(o.c, C.uint64_t(value))
}
func (o *Options) SetMaxBytesForLevelMultiplier(value float64) {
	C.rocksdb_options_set_max_bytes_for_level_multiplier(o.c, C.double(value))
}
func (o *Options) SetTargetFileSizeBase(value uint64) {
	C.rocksdb_options_set_target_file_size_base(o.c, C.uint64_t(value))
}
func (o *Options) SetTargetFileSizeMultiplier(value int) {
	C.rocksdb_options_set_target_file_size_multiplier(o.c, C.int(value))
}
func (o *Options) SetWriteBufferSize(value int) {
	C.rocksdb_options_set_write_buffer_size(o.c, C.size_t(value))
}
func (o *Options) SetDbWriteBufferSize(value int) {
	C.rocksdb_options_set_db_write_buffer_size(o.c, C.size_t(value))
}
func (o *Options) SetMaxSubCompactions(value int) {
	C.rocksdb_options_set_max_subcompactions(o.c, C.uint(value))
}
func (o *Options) SetEnablePipelinedWrite(value bool) {
	C.rocksdb_options_set_enable_pipelined_write(o.c, boolToUchar(value))
}
func (o *Options) SetUseFsync(value bool) {
	C.rocksdb_options_set_use_fsync(o.c, C.int(btoi(value)))
}
func (o *Options) SetUseDirectReads(value bool) {
	C.rocksdb_options_set_use_direct_reads(o.c, boolToUchar(value))
}
func (o *Options) SetUseDirectIOForFlushAndCompaction(value bool) {
	C.rocksdb_options_set_use_direct_io_for_flush_and_compaction(o.c, boolToUchar(value))
}
func (o *Options) SetMaxTotalWalSize(value uint64) {
	C.rocksdb_options_set_max_total_wal_size(o.c, C.uint64_t(value))
}
func (o *Options) SetDBLogDir(value string) {
	cValue := C.CString(value)
	defer C.free(unsafe.Pointer(cValue))
	C.rocksdb_options_set_db_log_dir(o.c, cValue)
}
func (o *Options) SetWalDir(value string) {
	cValue := C.CString(value)
	defer C.free(unsafe.Pointer(cValue))
	C.rocksdb_options_set_wal_dir(o.c, cValue)
}
func (o *Options) SetMaxBackgroundCompactions(value int) {
	C.rocksdb_options_set_max_background_compactions(o.c, C.int(value))
}
func (o *Options) SetMaxBackgroundFlushes(value int) {
	C.rocksdb_options_set_max_background_flushes(o.c, C.int(value))
}
func (o *Options) SetMaxLogFileSize(value int) {
	C.rocksdb_options_set_max_log_file_size(o.c, C.size_t(value))
}
func (o *Options) SetLogFileTimeToRoll(value int) {
	C.rocksdb_options_set_log_file_time_to_roll(o.c, C.size_t(value))
}