diff options
author | Susan LoVerso <sue@wiredtiger.com> | 2014-04-09 14:25:51 -0400 |
---|---|---|
committer | Susan LoVerso <sue@wiredtiger.com> | 2014-04-09 14:25:51 -0400 |
commit | 569be29173e98a138235a4b3a1023efa081ccb5a (patch) | |
tree | df59346cbc43190989e190146e20714faf06c84c /examples/c/ex_async.c | |
parent | 67321f50aff0f8971e1093a04c92080772b92be1 (diff) | |
download | mongo-569be29173e98a138235a4b3a1023efa081ccb5a.tar.gz |
Use an underlying cursor for async op keys/values.
Diffstat (limited to 'examples/c/ex_async.c')
-rw-r--r-- | examples/c/ex_async.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/examples/c/ex_async.c b/examples/c/ex_async.c index b0e76b7fbdc..b9a4698646e 100644 --- a/examples/c/ex_async.c +++ b/examples/c/ex_async.c @@ -118,25 +118,19 @@ retry: snprintf(k[i], sizeof(k), "key%d", i); snprintf(v[i], sizeof(v), "value%d", i); /*! [Set the op's string key] */ - key.data = k[i]; - key.size = sizeof(k[i]); - value.data = v[i]; - value.size = sizeof(v[i]); - op->set_key(op, &key); + op->set_key(op, k[i]); /*! [Set the op's string key] */ /*! [Set the op's string value] */ - op->set_value(op, &value); + op->set_value(op, v[i]); /*! [Set the op's string value] */ /*! [example insert] */ ret = op->insert(op); /*! [example insert] */ } - ret = wt_conn->async_new_op(wt_conn, uri, "raw", &cb, &opget); + ret = wt_conn->async_new_op(wt_conn, uri, NULL, &cb, &opget); snprintf(k[0], sizeof(k[0]), "key1"); - key.data = k[0]; - key.size = sizeof(k[0]); - opget->set_key(opget, &key); + opget->set_key(opget, k[0]); search_id = opget->get_id(opget); opget->search(opget); |