summaryrefslogtreecommitdiff
path: root/src/include/config.h
blob: 48a255134afcf8a578b8eb24128339c3f5e1b298 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*-
 * Copyright (c) 2014-2016 MongoDB, Inc.
 * Copyright (c) 2008-2014 WiredTiger, Inc.
 *	All rights reserved.
 *
 * See the file LICENSE for redistribution information.
 */

struct __wt_config {
	WT_SESSION_IMPL *session;
	const char *orig;
	const char *end;
	const char *cur;

	int depth, top;
	const int8_t *go;
};

struct __wt_config_check {
	const char *name;
	const char *type;
	int (*checkf)(WT_SESSION_IMPL *, WT_CONFIG_ITEM *);
	const char *checks;
	const WT_CONFIG_CHECK *subconfigs;
	u_int subconfigs_entries;
};

#define	WT_CONFIG_REF(session, n)					\
	(S2C(session)->config_entries[WT_CONFIG_ENTRY_##n])
struct __wt_config_entry {
	const char *method;			/* method name */

#define	WT_CONFIG_BASE(session, n)	(WT_CONFIG_REF(session, n)->base)
	const char *base;			/* configuration base */

	const WT_CONFIG_CHECK *checks;		/* check array */
	u_int checks_entries;
};

struct __wt_config_parser_impl {
	WT_CONFIG_PARSER iface;

	WT_SESSION_IMPL *session;
	WT_CONFIG config;
	WT_CONFIG_ITEM config_item;
};

/*
 * DO NOT EDIT: automatically built by dist/api_config.py.
 * configuration section: BEGIN
 */
#define	WT_CONFIG_ENTRY_WT_CONNECTION_add_collator	 0
#define	WT_CONFIG_ENTRY_WT_CONNECTION_add_compressor	 1
#define	WT_CONFIG_ENTRY_WT_CONNECTION_add_data_source	 2
#define	WT_CONFIG_ENTRY_WT_CONNECTION_add_encryptor	 3
#define	WT_CONFIG_ENTRY_WT_CONNECTION_add_extractor	 4
#define	WT_CONFIG_ENTRY_WT_CONNECTION_async_new_op	 5
#define	WT_CONFIG_ENTRY_WT_CONNECTION_close		 6
#define	WT_CONFIG_ENTRY_WT_CONNECTION_load_extension	 7
#define	WT_CONFIG_ENTRY_WT_CONNECTION_open_session	 8
#define	WT_CONFIG_ENTRY_WT_CONNECTION_reconfigure	 9
#define	WT_CONFIG_ENTRY_WT_CURSOR_close			10
#define	WT_CONFIG_ENTRY_WT_CURSOR_reconfigure		11
#define	WT_CONFIG_ENTRY_WT_SESSION_begin_transaction	12
#define	WT_CONFIG_ENTRY_WT_SESSION_checkpoint		13
#define	WT_CONFIG_ENTRY_WT_SESSION_close		14
#define	WT_CONFIG_ENTRY_WT_SESSION_commit_transaction	15
#define	WT_CONFIG_ENTRY_WT_SESSION_compact		16
#define	WT_CONFIG_ENTRY_WT_SESSION_create		17
#define	WT_CONFIG_ENTRY_WT_SESSION_drop			18
#define	WT_CONFIG_ENTRY_WT_SESSION_join			19
#define	WT_CONFIG_ENTRY_WT_SESSION_log_flush		20
#define	WT_CONFIG_ENTRY_WT_SESSION_log_printf		21
#define	WT_CONFIG_ENTRY_WT_SESSION_open_cursor		22
#define	WT_CONFIG_ENTRY_WT_SESSION_rebalance		23
#define	WT_CONFIG_ENTRY_WT_SESSION_reconfigure		24
#define	WT_CONFIG_ENTRY_WT_SESSION_rename		25
#define	WT_CONFIG_ENTRY_WT_SESSION_reset		26
#define	WT_CONFIG_ENTRY_WT_SESSION_rollback_transaction	27
#define	WT_CONFIG_ENTRY_WT_SESSION_salvage		28
#define	WT_CONFIG_ENTRY_WT_SESSION_snapshot		29
#define	WT_CONFIG_ENTRY_WT_SESSION_strerror		30
#define	WT_CONFIG_ENTRY_WT_SESSION_transaction_sync	31
#define	WT_CONFIG_ENTRY_WT_SESSION_truncate		32
#define	WT_CONFIG_ENTRY_WT_SESSION_upgrade		33
#define	WT_CONFIG_ENTRY_WT_SESSION_verify		34
#define	WT_CONFIG_ENTRY_colgroup_meta			35
#define	WT_CONFIG_ENTRY_file_config			36
#define	WT_CONFIG_ENTRY_file_meta			37
#define	WT_CONFIG_ENTRY_index_meta			38
#define	WT_CONFIG_ENTRY_lsm_meta			39
#define	WT_CONFIG_ENTRY_table_meta			40
#define	WT_CONFIG_ENTRY_wiredtiger_open			41
#define	WT_CONFIG_ENTRY_wiredtiger_open_all		42
#define	WT_CONFIG_ENTRY_wiredtiger_open_basecfg		43
#define	WT_CONFIG_ENTRY_wiredtiger_open_usercfg		44
/*
 * configuration section: END
 * DO NOT EDIT: automatically built by dist/flags.py.
 */