Made various aesthetic changes.

Normalized style headers, added item to CHANGELOG regarding imports.
master
Alexander Regueiro 8 years ago
parent 27210b42bc
commit d9e0e9ad79
  1. 1
      CHANGELOG.txt
  2. 10
      README.md
  3. 1
      rocksdb-sys/src/lib.rs
  4. 1
      rocksdb-sys/src/test.rs
  5. 1
      rocksdb-sys/tests/ffi.rs
  6. 3
      src/lib.rs
  7. 15
      test/test.rs
  8. 1
      test/test_column_family.rs
  9. 15
      test/test_iterator.rs
  10. 15
      test/test_multithreaded.rs
  11. 16
      test/test_rocksdb_options.rs

@ -4,5 +4,6 @@ Changelog
0.5 (in development)
~~~~~~~~~~~~~~~~~~~~
* All imports of `rocksdb::rocksdb::*` should now be simply `rocksdb::*` (alexreg)
* Add iterator_cf to snapshot (jezell)
* Changelog started

@ -3,9 +3,9 @@ rust-rocksdb
[![Build Status](https://travis-ci.org/spacejam/rust-rocksdb.svg?branch=master)](https://travis-ci.org/spacejam/rust-rocksdb)
[![crates.io](http://meritbadge.herokuapp.com/rocksdb)](https://crates.io/crates/rocksdb)
This library has been tested against RocksDB 3.13.1 on linux and OSX. The 0.4.1 crate should work with the Rust 1.9 stable and nightly releases as of 7/1/16.
This library has been tested against RocksDB 3.13.1 on Linux and OS X. The 0.4.1 crate should work with the Rust 1.9 stable and nightly releases as of 7/1/16.
### status
### Status
- [x] basic open/put/get/delete/close
- [x] rustic merge operator
- [x] write batch (thanks @dgrnbrg!)
@ -46,7 +46,7 @@ fn main() {
}
```
###### Doing an atomic commit of several writes
###### Making an atomic commit of several writes
```rust
extern crate rocksdb;
use rocksdb::{DB, WriteBatch, Writable};
@ -64,7 +64,7 @@ fn main() {
}
```
###### Getting an Iterator
###### Getting an `Iterator`
```rust
extern crate rocksdb;
use rocksdb::{DB, Direction, IteratorMode};
@ -93,7 +93,7 @@ fn main() {
}
```
###### Getting an Iterator from a Snapshot
###### Getting an `Iterator` from a `Snapshot`
```rust
extern crate rocksdb;
use rocksdb::{DB, Direction};

@ -1,4 +1,3 @@
//
// Copyright 2014 Tyler Neely, 2016 Alex Regueiro
//
// Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,3 @@
//
// Copyright 2014 Tyler Neely
//
// Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,3 @@
//
// Copyright 2016 Alex Regueiro
//
// Licensed under the Apache License, Version 2.0 (the "License");

@ -16,9 +16,8 @@
extern crate libc;
extern crate rocksdb_sys as ffi;
pub mod merge_operator;
pub mod comparator;
pub mod merge_operator;
mod rocksdb;
mod rocksdb_options;

@ -1,3 +1,18 @@
// Copyright 2014 Tyler Neely
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
extern crate rocksdb;
mod test_iterator;

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
use rocksdb::{DB, MergeOperands, Options, Writable};
#[test]

@ -1,3 +1,18 @@
// Copyright 2014 Tyler Neely
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
use rocksdb::{DB, Direction, IteratorMode, Options, Writable};
fn cba(input: &Box<[u8]>) -> Box<[u8]> {

@ -1,3 +1,18 @@
// Copyright 2014 Tyler Neely
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
use rocksdb::{DB, Options, Writable};
use std::thread;
use std::sync::Arc;

@ -1,5 +1,19 @@
use rocksdb::{DB, Options};
// Copyright 2014 Tyler Neely
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
use rocksdb::{DB, Options};
#[test]
fn test_set_num_levels() {

Loading…
Cancel
Save