Skip to content

Commit 573871c

Browse files
authored
Merge pull request #21 from tikv/sun/remove_cf_and_batch_scan
Remove cf and batch_scan from examples/raw.rs
2 parents ba86754 + 23cb2ef commit 573871c

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

examples/raw.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use tikv_client::{raw::Client, Config, Key, KvPair, Result, Value};
1717

1818
const KEY: &str = "TiKV";
1919
const VALUE: &str = "Rust";
20-
const CUSTOM_CF: &str = "default";
2120

2221
fn main() -> Result<()> {
2322
// Create a configuration to use for the example.
@@ -66,14 +65,12 @@ fn main() -> Result<()> {
6665
// This is *advanced usage* and should have some special considerations.
6766
client
6867
.delete(key.clone())
69-
.cf(CUSTOM_CF)
7068
.wait()
7169
.expect("Could not delete value");
7270
println!("Key: {:?} deleted", key);
7371

7472
client
7573
.get(key)
76-
.cf(CUSTOM_CF)
7774
.wait()
7875
.expect_err("Get returned value for not existing key");
7976

@@ -89,7 +86,6 @@ fn main() -> Result<()> {
8986

9087
let values = client
9188
.batch_get(keys.clone())
92-
.cf(CUSTOM_CF)
9389
.wait()
9490
.expect("Could not get values");
9591
println!("Found values: {:?} for keys: {:?}", values, keys);
@@ -98,19 +94,10 @@ fn main() -> Result<()> {
9894
let end: Key = b"k2".to_vec().into();
9995
client
10096
.scan(start.clone()..end.clone(), 10)
101-
.cf(CUSTOM_CF)
10297
.key_only()
10398
.wait()
10499
.expect("Could not scan");
105100

106-
let ranges = vec![start.clone()..end.clone(), start.clone()..end.clone()];
107-
client
108-
.batch_scan(ranges, 10)
109-
.cf(CUSTOM_CF)
110-
.key_only()
111-
.wait()
112-
.expect("Could not batch scan");
113-
114101
// Cleanly exit.
115102
Ok(())
116103
}

0 commit comments

Comments
 (0)