|
|
@ -94,16 +94,20 @@ mod tests {
|
|
|
|
builder.build_value(&Value::RefString("Another key"));
|
|
|
|
builder.build_value(&Value::RefString("Another key"));
|
|
|
|
let key2 = builder.get();
|
|
|
|
let key2 = builder.get();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let val = db.get(&key, None).unwrap();
|
|
|
|
|
|
|
|
// let val = val.as_bytes();
|
|
|
|
|
|
|
|
println!("before anything {}", val.is_none());
|
|
|
|
|
|
|
|
|
|
|
|
db.put(&key, "A motherfucking value!!! 👋👋👋", None).unwrap();
|
|
|
|
db.put(&key, "A motherfucking value!!! 👋👋👋", None).unwrap();
|
|
|
|
db.put(&key2, "Another motherfucking value!!! 👋👋👋", None).unwrap();
|
|
|
|
db.put(&key2, "Another motherfucking value!!! 👋👋👋", None).unwrap();
|
|
|
|
// db.put("Yes man", "A motherfucking value!!! 👋👋👋", None).unwrap();
|
|
|
|
// db.put("Yes man", "A motherfucking value!!! 👋👋👋", None).unwrap();
|
|
|
|
let val = db.get(&key, None).unwrap();
|
|
|
|
let val = db.get(&key, None).unwrap().unwrap();
|
|
|
|
let val = val.as_bytes();
|
|
|
|
let val = val.as_bytes();
|
|
|
|
println!("{}", from_utf8(val).unwrap());
|
|
|
|
println!("{}", from_utf8(val).unwrap());
|
|
|
|
let val = db.get(&key2, None).unwrap();
|
|
|
|
let val = db.get(&key2, None).unwrap().unwrap();
|
|
|
|
let val = val.as_bytes();
|
|
|
|
let val = val.as_bytes();
|
|
|
|
println!("{}", from_utf8(val).unwrap());
|
|
|
|
println!("{}", from_utf8(val).unwrap());
|
|
|
|
let val = db.get(&key, None).unwrap();
|
|
|
|
let val = db.get(&key, None).unwrap().unwrap();
|
|
|
|
let val = val.as_bytes();
|
|
|
|
let val = val.as_bytes();
|
|
|
|
println!("{}", from_utf8(val).unwrap());
|
|
|
|
println!("{}", from_utf8(val).unwrap());
|
|
|
|
}
|
|
|
|
}
|
|
|
|