summaryrefslogtreecommitdiff
path: root/examples/c/ex_all.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/c/ex_all.c')
-rw-r--r--examples/c/ex_all.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/c/ex_all.c b/examples/c/ex_all.c
index 31ad812e6f6..6fe5296ea58 100644
--- a/examples/c/ex_all.c
+++ b/examples/c/ex_all.c
@@ -242,6 +242,19 @@ cursor_ops(WT_SESSION *session)
}
{
+ WT_CURSOR *other = NULL;
+ /*! [Cursor equality] */
+ int equal;
+ ret = cursor->compare_equal(cursor, other, &equal);
+ if (equal == 0) {
+ /* Cursors reference the same key */
+ } else {
+ /* Cursors don't reference the same key */
+ }
+ /*! [Cursor equality] */
+ }
+
+ {
/*! [Search for an exact match] */
const char *key = "some key";
cursor->set_key(cursor, key);