diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-09-11 21:49:27 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-09-11 21:49:27 +1000 |
commit | 0118bebad02e2a4afdaad88d536d8a531f043580 (patch) | |
tree | f64b208d39162a0fc92ec3bae30f367be5de6d34 /examples | |
parent | 4a901b42ab03a708de27c31a0bc6c9ad582191aa (diff) | |
download | mongo-0118bebad02e2a4afdaad88d536d8a531f043580.tar.gz |
Add an API for multi-key index extractors.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/c/ex_all.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/c/ex_all.c b/examples/c/ex_all.c index ea5d26ce133..f3e32974dfc 100644 --- a/examples/c/ex_all.c +++ b/examples/c/ex_all.c @@ -777,14 +777,15 @@ add_collator(WT_CONNECTION *conn) static int my_extract(WT_EXTRACTOR *extractor, WT_SESSION *session, const WT_ITEM *key, const WT_ITEM *value, - WT_ITEM *result) + WT_CURSOR *result_cursor, WT_EXTRACTOR_MULTIPLE **emp) { /* Unused parameters */ (void)extractor; (void)session; (void)key; + (void)emp; - *result = *value; + result_cursor->set_key(result_cursor, value); return (0); } /*! [WT_EXTRACTOR] */ @@ -795,7 +796,7 @@ add_extractor(WT_CONNECTION *conn) int ret; /*! [WT_EXTRACTOR register] */ - static WT_EXTRACTOR my_extractor = {my_extract}; + static WT_EXTRACTOR my_extractor = {my_extract, NULL}; ret = conn->add_extractor(conn, "my_extractor", &my_extractor, NULL); /*! [WT_EXTRACTOR register] */ |