From 53fefa746ea76cc7b77e28da8491f80499f8c756 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Wed, 4 Jan 2012 10:57:05 +0000 Subject: 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 --- examples/c/ex_all.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'examples') 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); -- cgit v1.2.1