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.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/examples/c/ex_all.c b/examples/c/ex_all.c
index 00aee5ba57d..e562af73fc3 100644
--- a/examples/c/ex_all.c
+++ b/examples/c/ex_all.c
@@ -892,6 +892,20 @@ connection_ops(WT_CONNECTION *conn)
}
/*! [Check if the database is newly created] */
+ /*! [Validate a configuration string] */
+ /*
+ * Validate a configuration string for a WiredTiger function or method.
+ *
+ * Functions are specified by name (for example, "wiredtiger_open").
+ *
+ * Methods are specified using a concatenation of the handle name, a
+ * period and the method name (for example, session create would be
+ * "WT_SESSION.create" and cursor close would be WT_CURSOR.close").
+ */
+ ret = wiredtiger_config_validate(
+ NULL, NULL, "WT_SESSION.create", "allocation_size=32KB");
+ /*! [Validate a configuration string] */
+
{
/*! [Open a session] */
WT_SESSION *session;
@@ -906,9 +920,12 @@ connection_ops(WT_CONNECTION *conn)
* Applications opening a cursor for the data-source object "my_data"
* have an additional configuration option "entries", which is an
* integer type, defaults to 5, and must be an integer between 1 and 10.
+ *
+ * The method being configured is specified using a concatenation of the
+ * handle name, a period and the method name.
*/
ret = conn->configure_method(conn,
- "session.open_cursor",
+ "WT_SESSION.open_cursor",
"my_data:", "entries=5", "int", "min=1,max=10");
/*
@@ -917,7 +934,7 @@ connection_ops(WT_CONNECTION *conn)
* of strings.
*/
ret = conn->configure_method(conn,
- "session.open_cursor", "my_data:", "devices", "list", NULL);
+ "WT_SESSION.open_cursor", "my_data:", "devices", "list", NULL);
/*! [Configure method configuration] */
/*! [Close a connection] */