This is an example of how to create and open a database.
#include <test_util.h>
static const char *home;
int
main(int argc, char *argv[])
{
home = example_setup(argc, argv);
error_check(conn->
open_session(conn, NULL, NULL, &session));
error_check(conn->
close(conn, NULL));
return (EXIT_SUCCESS);
}
int wiredtiger_open(const char *home, WT_EVENT_HANDLER *event_handler, const char *config, WT_CONNECTION **connectionp)
Open a connection to a database.
A connection to a WiredTiger database.
Definition wiredtiger.in:2106
int open_session(WT_CONNECTION *connection, WT_EVENT_HANDLER *event_handler, const char *config, WT_SESSION **sessionp)
int close(WT_CONNECTION *connection, const char *config)
All data operations are performed in the context of a WT_SESSION.
Definition wiredtiger.in:822