|
|
|
@ -1,14 +1,16 @@ |
|
|
|
|
extern crate rocksdb; |
|
|
|
|
mod util; |
|
|
|
|
|
|
|
|
|
use rocksdb::{Options, DB}; |
|
|
|
|
use util::DBPath; |
|
|
|
|
|
|
|
|
|
#[test] |
|
|
|
|
fn test_pinnable_slice() { |
|
|
|
|
let path = "_rust_rocksdb_pinnable_slice_test"; |
|
|
|
|
let path = DBPath::new("_rust_rocksdb_pinnable_slice_test"); |
|
|
|
|
|
|
|
|
|
let mut opts = Options::default(); |
|
|
|
|
opts.create_if_missing(true); |
|
|
|
|
let db = DB::open(&opts, path).unwrap(); |
|
|
|
|
let db = DB::open(&opts, &path).unwrap(); |
|
|
|
|
|
|
|
|
|
db.put(b"k1", b"value12345").unwrap(); |
|
|
|
|
|
|
|
|
|