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
97993162
Commit
97993162
authored
Jul 06, 2016
by
goroutine
Committed by
GitHub
Jul 06, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #23 from disksing/disksing/update-cf
remove seekKey for iterator creation (with cf).
parents
e340fdda
9e3c0af4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
rocksdb.rs
src/rocksdb.rs
+6
-14
No files found.
src/rocksdb.rs
View file @
97993162
...
@@ -159,23 +159,18 @@ impl<'a> DBIterator<'a> {
...
@@ -159,23 +159,18 @@ impl<'a> DBIterator<'a> {
fn
new_cf
(
db
:
&
'a
DB
,
fn
new_cf
(
db
:
&
'a
DB
,
cf_handle
:
DBCFHandle
,
cf_handle
:
DBCFHandle
,
readopts
:
&
ReadOptions
,
readopts
:
&
ReadOptions
)
key
:
SeekKey
)
->
DBIterator
<
'a
>
{
->
Result
<
DBIterator
<
'a
>
,
String
>
{
unsafe
{
unsafe
{
let
iterator
=
let
iterator
=
rocksdb_ffi
::
rocksdb_create_iterator_cf
(
db
.inner
,
rocksdb_ffi
::
rocksdb_create_iterator_cf
(
db
.inner
,
readopts
.inner
,
readopts
.inner
,
cf_handle
);
cf_handle
);
let
mut
rv
=
DBIterator
{
DBIterator
{
db
:
db
,
db
:
db
,
inner
:
iterator
,
inner
:
iterator
,
};
}
rv
.seek
(
key
);
Ok
(
rv
)
}
}
}
}
}
}
...
@@ -607,12 +602,9 @@ impl DB {
...
@@ -607,12 +602,9 @@ impl DB {
DBIterator
::
new
(
&
self
,
opt
)
DBIterator
::
new
(
&
self
,
opt
)
}
}
pub
fn
iter_cf
(
&
self
,
pub
fn
iter_cf
(
&
self
,
cf_handle
:
DBCFHandle
)
->
DBIterator
{
cf_handle
:
DBCFHandle
,
key
:
SeekKey
)
->
Result
<
DBIterator
,
String
>
{
let
opts
=
ReadOptions
::
new
();
let
opts
=
ReadOptions
::
new
();
DBIterator
::
new_cf
(
&
self
,
cf_handle
,
&
opts
,
key
)
DBIterator
::
new_cf
(
&
self
,
cf_handle
,
&
opts
)
}
}
pub
fn
snapshot
(
&
self
)
->
Snapshot
{
pub
fn
snapshot
(
&
self
)
->
Snapshot
{
...
...
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