summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@wiredtiger.com>2012-01-04 10:57:05 +0000
committerKeith Bostic <keith.bostic@wiredtiger.com>2012-01-04 10:57:05 +0000
commit53fefa746ea76cc7b77e28da8491f80499f8c756 (patch)
tree00d04309e5ac117b000e37f43636057c795d1866 /examples
parent7f606520b0c67b49233edc8e0f1905e2fe46fb55 (diff)
downloadmongo-53fefa746ea76cc7b77e28da8491f80499f8c756.tar.gz
Clarify the session->truncate documentation, add the simple code that
does truncation from beginning to a mid-point or from a mid-point to the end. --HG-- extra : rebase_source : f976e573ea45201c419576a701e8a0f82513bfa4
Diffstat (limited to 'examples')
-rw-r--r--examples/c/ex_all.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/c/ex_all.c b/examples/c/ex_all.c
index 304f9aad9b9..6b57376d31e 100644
--- a/examples/c/ex_all.c
+++ b/examples/c/ex_all.c
@@ -263,6 +263,14 @@ session_ops(WT_SESSION *session)
ret = session->truncate(session, "table:mytable", NULL, NULL, NULL);
+ {
+ /*! [Truncate cursor] */
+ WT_CURSOR *start, *stop;
+
+ ret = session->truncate(session, NULL, start, stop, NULL);
+ /*! [Truncate cursor] */
+ }
+
ret = session->verify(session, "table:mytable", NULL);
ret = session->begin_transaction(session, NULL);