Shows how to configure some properties of the database and tables.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wiredtiger.h>
static const char *home;
int
main(void)
{
int ret;
const char *key, *value;
if (getenv("WIREDTIGER_HOME") == NULL) {
home = "WT_HOME";
ret = system("rm -rf WT_HOME && mkdir WT_HOME");
} else
home = NULL;
"create,cache_size=500M", &conn)) != 0)
fprintf(stderr, "Error connecting to %s: %s\n",
ret = session->
create(session,
"table:access", "key_format=S,value_format=S");
ret = session->
open_cursor(session,
"config:", NULL, NULL, &cursor);
while ((ret = cursor->
next(cursor)) == 0) {
ret = cursor->
get_key(cursor, &key);
printf("configuration value: %s = %s\n", key, value);
}
ret = conn->
close(conn, NULL);
return (ret);
}