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
80300668
Commit
80300668
authored
Jun 25, 2017
by
Huachao Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address comment
parent
ce9b8225
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
Cargo.toml
Cargo.toml
+4
-1
table_properties.rs
src/table_properties.rs
+11
-11
No files found.
Cargo.toml
View file @
80300668
...
...
@@ -29,7 +29,9 @@ path = "tests/test.rs"
[dependencies]
libc
=
"0.2.11"
tempdir
=
"0.3.4"
byteorder
=
"1.0.0"
[dependencies.librocksdb_sys]
path
=
"librocksdb_sys"
[dev-dependencies]
byteorder
=
"1.0.0"
\ No newline at end of file
src/table_properties.rs
View file @
80300668
...
...
@@ -71,8 +71,8 @@ impl CShallowStringsMap {
let
keys
=
slice
::
from_raw_parts
(
self
.keys
,
self
.size
);
let
values
=
slice
::
from_raw_parts
(
self
.values
,
self
.size
);
for
i
in
0
..
self
.size
{
let
k
=
ptr_to_string
(
keys
[
i
])
?
;
let
v
=
ptr_to_string
(
values
[
i
])
?
;
let
k
=
try!
(
ptr_to_string
(
keys
[
i
]))
;
let
v
=
try!
(
ptr_to_string
(
values
[
i
]))
;
res
.insert
(
k
,
v
);
}
}
...
...
@@ -152,15 +152,15 @@ impl TablePropertiesCollectionHandle {
format_version
:
props
.format_version
,
fixed_key_len
:
props
.fixed_key_len
,
column_family_id
:
props
.column_family_id
,
column_family_name
:
ptr_to_string
(
props
.column_family_name
)
?
,
filter_policy_name
:
ptr_to_string
(
props
.filter_policy_name
)
?
,
comparator_name
:
ptr_to_string
(
props
.comparator_name
)
?
,
merge_operator_name
:
ptr_to_string
(
props
.merge_operator_name
)
?
,
prefix_extractor_name
:
ptr_to_string
(
props
.prefix_extractor_name
)
?
,
property_collectors_names
:
ptr_to_string
(
props
.property_collectors_names
)
?
,
compression_name
:
ptr_to_string
(
props
.compression_name
)
?
,
user_collected_properties
:
props
.user_collected_properties
.to_bytes_map
()
?
,
readable_properties
:
props
.readable_properties
.to_strings_map
()
?
,
column_family_name
:
try!
(
ptr_to_string
(
props
.column_family_name
))
,
filter_policy_name
:
try!
(
ptr_to_string
(
props
.filter_policy_name
))
,
comparator_name
:
try!
(
ptr_to_string
(
props
.comparator_name
))
,
merge_operator_name
:
try!
(
ptr_to_string
(
props
.merge_operator_name
))
,
prefix_extractor_name
:
try!
(
ptr_to_string
(
props
.prefix_extractor_name
))
,
property_collectors_names
:
try!
(
ptr_to_string
(
props
.property_collectors_names
))
,
compression_name
:
try!
(
ptr_to_string
(
props
.compression_name
))
,
user_collected_properties
:
try!
(
props
.user_collected_properties
.to_bytes_map
())
,
readable_properties
:
try!
(
props
.readable_properties
.to_strings_map
())
,
};
collection
.insert
(
k
,
v
);
}
...
...
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