diff --git a/examples/raw.rs b/examples/raw.rs index b65d88d5..e9501881 100644 --- a/examples/raw.rs +++ b/examples/raw.rs @@ -17,7 +17,6 @@ use tikv_client::{raw::Client, Config, Key, KvPair, Result, Value}; const KEY: &str = "TiKV"; const VALUE: &str = "Rust"; -const CUSTOM_CF: &str = "default"; fn main() -> Result<()> { // Create a configuration to use for the example. @@ -66,14 +65,12 @@ fn main() -> Result<()> { // This is *advanced usage* and should have some special considerations. client .delete(key.clone()) - .cf(CUSTOM_CF) .wait() .expect("Could not delete value"); println!("Key: {:?} deleted", key); client .get(key) - .cf(CUSTOM_CF) .wait() .expect_err("Get returned value for not existing key"); @@ -89,7 +86,6 @@ fn main() -> Result<()> { let values = client .batch_get(keys.clone()) - .cf(CUSTOM_CF) .wait() .expect("Could not get values"); println!("Found values: {:?} for keys: {:?}", values, keys); @@ -98,19 +94,10 @@ fn main() -> Result<()> { let end: Key = b"k2".to_vec().into(); client .scan(start.clone()..end.clone(), 10) - .cf(CUSTOM_CF) .key_only() .wait() .expect("Could not scan"); - let ranges = vec![start.clone()..end.clone(), start.clone()..end.clone()]; - client - .batch_scan(ranges, 10) - .cf(CUSTOM_CF) - .key_only() - .wait() - .expect("Could not batch scan"); - // Cleanly exit. Ok(()) }