summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2012-04-20 17:29:26 +0000
committerKeith Bostic <keith@wiredtiger.com>2012-04-20 17:29:26 +0000
commit1d7598e4d28b9a31d4d15aa627a45bb504c75c15 (patch)
tree05547fce9a5f80d3fcc9995ede80829d18fd7861 /examples
parentd0449232eb83747706489e09070182d5ac277910 (diff)
downloadmongo-1d7598e4d28b9a31d4d15aa627a45bb504c75c15.tar.gz
Finish out the snapshot documentation (ref #167).
Diffstat (limited to 'examples')
-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 88d01cb467c..f7d6c0e60b5 100644
--- a/examples/c/ex_all.c
+++ b/examples/c/ex_all.c
@@ -297,7 +297,20 @@ session_ops(WT_SESSION *session)
/*! [session checkpoint] */
/*! [session drop] */
+ /* Discard a table. */
ret = session->drop(session, "table:mytable", NULL);
+
+ /* Drop all snapshots from a table. */
+ ret = session->drop(session, "table:mytable", "snapall=true");
+
+ /* Drop all snapshots after, and including, "January". */
+ ret = session->drop(session, "table:mytable", "snapfrom=January");
+
+ /* Drop the "June" snapshot. */
+ ret = session->drop(session, "table:mytable", "snapshot=June");
+
+ /* Drop all snapshots before, and including, "November". */
+ ret = session->drop(session, "table:mytable", "snapto=November");
/*! [session drop] */
/*! [session dumpfile] */