hello_world_upsert_sync/hello_world_upsert_sync.rs
1extern crate gauc;
2extern crate env_logger;
3
4use gauc::client::*;
5
6fn main() {
7 env_logger::init().unwrap();
8
9 if let Ok(mut client) = Client::connect("couchbase://localhost/default", None) {
10 let res = client.upsert_sync("hello_world_upsert_sync", "{{\"msg\": \"This is sync upsert!\"}}", 0, 0);
11 println!("{:?}", res);
12
13 let res = client.get_sync("hello_world_upsert_sync");
14 println!("{:?}", res);
15 }
16}