From bc976129f832f6d7942645a7415e1a97f41102e8 Mon Sep 17 00:00:00 2001 From: Dmitriy Gromov Date: Fri, 10 Apr 2020 17:38:00 -0400 Subject: [PATCH] Adding support for setting total_order_seek --- options_read.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/options_read.go b/options_read.go index 6a37cc48..a55d2c67 100644 --- a/options_read.go +++ b/options_read.go @@ -129,6 +129,18 @@ func (opts *ReadOptions) SetReadaheadSize(value uint64) { C.rocksdb_readoptions_set_readahead_size(opts.c, C.size_t(value)) } +// SetTotalOrderSeek specifies the value of "total_order_seek". +// Enable a total order seek regardless of index format (e.g. hash index) +// used in the table. Some table format (e.g. plain table) may not support +// this option. +// If true when calling Get(), we also skip prefix bloom when reading from +// block based table. It provides a way to read existing data after +// changing implementation of prefix extractor. +// Default: false +func (opts *ReadOptions) SetTotalOrderSeek(value bool) { + C.rocksdb_readoptions_set_total_order_seek(opts.c, boolToChar(value)) +} + // Destroy deallocates the ReadOptions object. func (opts *ReadOptions) Destroy() { C.rocksdb_readoptions_destroy(opts.c)