Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
rust-rocksdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangzongwu
rust-rocksdb
Commits
9fbf6202
Commit
9fbf6202
authored
Jul 11, 2016
by
zhangjinpeng1987
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add set_cache_index_and_filter_blocks
parent
cb11b928
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
lib.rs
librocksdb_sys/src/lib.rs
+3
-1
rocksdb_options.rs
src/rocksdb_options.rs
+7
-0
No files found.
librocksdb_sys/src/lib.rs
View file @
9fbf6202
...
...
@@ -17,7 +17,7 @@ extern crate libc;
#[cfg(test)]
extern
crate
tempdir
;
use
libc
::{
c_char
,
c_int
,
c_void
,
size_t
,
uint64_t
};
use
libc
::{
c_char
,
c_
uchar
,
c_
int
,
c_void
,
size_t
,
uint64_t
};
use
std
::
ffi
::
CStr
;
use
std
::
str
::
from_utf8
;
...
...
@@ -124,6 +124,8 @@ extern "C" {
pub
fn
rocksdb_block_based_options_set_block_restart_interval
(
block_options
:
DBBlockBasedTableOptions
,
block_restart_interval
:
c_int
);
pub
fn
rocksdb_block_based_options_set_cache_index_and_filter_blocks
(
block_options
:
DBBlockBasedTableOptions
,
v
:
c_uchar
);
pub
fn
rocksdb_block_based_options_set_filter_policy
(
block_options
:
DBBlockBasedTableOptions
,
filter_policy
:
DBFilterPolicy
);
...
...
src/rocksdb_options.rs
View file @
9fbf6202
...
...
@@ -121,6 +121,13 @@ impl BlockBasedOptions {
filter
.inner
);
}
}
pub
fn
set_cache_index_and_filter_blocks
(
&
mut
self
,
v
:
bool
)
{
unsafe
{
rocksdb_ffi
::
rocksdb_block_based_options_set_cache_index_and_filter_blocks
(
self
.inner
,
v
as
u8
);
}
}
}
// TODO figure out how to create these in a Rusty way
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment