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
ca55143a
Commit
ca55143a
authored
May 25, 2016
by
siddontang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use range instead
parent
41b38de9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
rocksdb.rs
src/rocksdb.rs
+10
-14
No files found.
src/rocksdb.rs
View file @
ca55143a
...
...
@@ -813,19 +813,16 @@ impl DB {
sizes
}
pub
fn
delete_file_in_range
(
&
self
,
start_key
:
&
[
u8
],
limit_key
:
&
[
u8
])
->
Result
<
(),
String
>
{
pub
fn
delete_file_in_range
(
&
self
,
r
:
Range
)
->
Result
<
(),
String
>
{
unsafe
{
let
mut
err
:
*
const
i8
=
0
as
*
const
i8
;
let
err_ptr
:
*
mut
*
const
i8
=
&
mut
err
;
rocksdb_ffi
::
rocksdb_delete_file_in_range
(
self
.inner
,
start_key
.as_ptr
(),
start_key
.len
()
as
size_t
,
limit
_key
.as_ptr
(),
limit
_key
.len
()
as
size_t
,
r
.
start_key
.as_ptr
(),
r
.
start_key
.len
()
as
size_t
,
r
.end
_key
.as_ptr
(),
r
.end
_key
.len
()
as
size_t
,
err_ptr
);
if
!
err
.is_null
()
{
return
Err
(
error_message
(
err
));
...
...
@@ -836,8 +833,7 @@ impl DB {
pub
fn
delete_file_in_range_cf
(
&
self
,
cf
:
DBCFHandle
,
start_key
:
&
[
u8
],
limit_key
:
&
[
u8
])
r
:
Range
)
->
Result
<
(),
String
>
{
unsafe
{
let
mut
err
:
*
const
i8
=
0
as
*
const
i8
;
...
...
@@ -845,10 +841,10 @@ impl DB {
rocksdb_ffi
::
rocksdb_delete_file_in_range_cf
(
self
.inner
,
cf
,
start_key
.as_ptr
(),
start_key
.len
()
as
size_t
,
limit
_key
.as_ptr
(),
limit
_key
.len
()
as
size_t
,
r
.
start_key
.as_ptr
(),
r
.
start_key
.len
()
as
size_t
,
r
.end
_key
.as_ptr
(),
r
.end
_key
.len
()
as
size_t
,
err_ptr
);
if
!
err
.is_null
()
{
return
Err
(
error_message
(
err
));
...
...
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