Drizzled Public API Documentation

enum.h
1 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3  *
4  * Copyright (C) 2009 Sun Microsystems, Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #pragma once
22 
23 namespace drizzled
24 {
25 
39 {
40  DERIVATION_IGNORABLE= 5,
41  DERIVATION_COERCIBLE= 4,
42  DERIVATION_SYSCONST= 3,
43  DERIVATION_IMPLICIT= 2,
44  DERIVATION_NONE= 1,
45  DERIVATION_EXPLICIT= 0
46 };
47 
48 enum enum_parsing_place
49 {
50  NO_MATTER,
51  IN_HAVING,
52  SELECT_LIST,
53  IN_WHERE,
54  IN_ON
55 };
56 
57 enum enum_mysql_completiontype
58 {
59  ROLLBACK_RELEASE= -2,
60  ROLLBACK= 1,
61  ROLLBACK_AND_CHAIN= 7,
62  COMMIT_RELEASE= -1,
63  COMMIT= 0,
64  COMMIT_AND_CHAIN= 6
65 };
66 
67 enum enum_check_fields
68 {
69  CHECK_FIELD_IGNORE,
70  CHECK_FIELD_WARN,
71  CHECK_FIELD_ERROR_FOR_NULL
72 };
73 
74 enum sql_var_t
75 {
76  OPT_DEFAULT= 0,
77  OPT_SESSION,
78  OPT_GLOBAL
79 };
80 
81 enum column_format_type
82 {
83  COLUMN_FORMAT_TYPE_NOT_USED= -1,
84  COLUMN_FORMAT_TYPE_DEFAULT= 0,
85  COLUMN_FORMAT_TYPE_FIXED= 1,
86  COLUMN_FORMAT_TYPE_DYNAMIC= 2
87 };
88 
89 
94 {
99 
112 
122 
138  /*
139  TODO: Fixing the performance issues of I_S will lead
140  to I_S tables in the table cache, which should use
141  this table type.
142  */
144 };
145 
146 enum enum_mark_columns
147 {
148  MARK_COLUMNS_NONE,
149  MARK_COLUMNS_READ,
150  MARK_COLUMNS_WRITE
151 };
152 
153 enum enum_filetype
154 {
155  FILETYPE_CSV,
156  FILETYPE_XML
157 };
158 
159 enum find_item_error_report_type
160 {
161  REPORT_ALL_ERRORS,
162  REPORT_EXCEPT_NOT_FOUND,
163  IGNORE_ERRORS,
164  REPORT_EXCEPT_NON_UNIQUE,
165  IGNORE_EXCEPT_NON_UNIQUE
166 };
167 
168 /*
169  Values in this enum are used to indicate how a tables TIMESTAMP field
170  should be treated. It can be set to the current timestamp on insert or
171  update or both.
172  WARNING: The values are used for bit operations. If you change the
173  enum, you must keep the bitwise relation of the values. For example:
174  (int) TIMESTAMP_AUTO_SET_ON_BOTH must be equal to
175  (int) TIMESTAMP_AUTO_SET_ON_INSERT | (int) TIMESTAMP_AUTO_SET_ON_UPDATE.
176  We use an enum here so that the debugger can display the value names.
177 */
178 enum timestamp_auto_set_type
179 {
180  TIMESTAMP_NO_AUTO_SET= 0,
181  TIMESTAMP_AUTO_SET_ON_INSERT= 1,
182  TIMESTAMP_AUTO_SET_ON_UPDATE= 2,
183  TIMESTAMP_AUTO_SET_ON_BOTH= 3
184 };
185 
186 enum enum_ha_read_modes
187 {
188  RFIRST,
189  RNEXT,
190  RPREV,
191  RLAST,
192  RKEY,
193  RNEXT_SAME
194 };
195 
196 enum enum_tx_isolation
197 {
198  ISO_READ_UNCOMMITTED,
199  ISO_READ_COMMITTED,
200  ISO_REPEATABLE_READ,
201  ISO_SERIALIZABLE
202 };
203 
204 
205 enum SHOW_COMP_OPTION
206 {
207  SHOW_OPTION_YES,
208  SHOW_OPTION_NO,
209  SHOW_OPTION_DISABLED
210 };
211 
212 /*
213  When a command is added here, be sure it's also added in mysqld.cc
214  in "struct show_var_st status_vars[]= {" ...
215 
216  If the command returns a result set or is not allowed in stored
217  functions or triggers, please also make sure that
218  sp_get_flags_for_command (sp_head.cc) returns proper flags for the
219  added SQLCOM_.
220 */
221 
222 enum enum_sql_command {
223  SQLCOM_SELECT,
224  SQLCOM_CREATE_TABLE,
225  SQLCOM_CREATE_INDEX,
226  SQLCOM_ALTER_TABLE,
227  SQLCOM_UPDATE,
228  SQLCOM_INSERT,
229  SQLCOM_INSERT_SELECT,
230  SQLCOM_DELETE,
231  SQLCOM_TRUNCATE,
232  SQLCOM_DROP_TABLE,
233  SQLCOM_DROP_INDEX,
234  SQLCOM_SHOW_CREATE,
235  SQLCOM_SHOW_CREATE_DB,
236  SQLCOM_LOAD,
237  SQLCOM_SET_OPTION,
238  SQLCOM_UNLOCK_TABLES,
239  SQLCOM_CHANGE_DB,
240  SQLCOM_CREATE_DB,
241  SQLCOM_DROP_DB,
242  SQLCOM_ALTER_DB,
243  SQLCOM_REPLACE,
244  SQLCOM_REPLACE_SELECT,
245  SQLCOM_CHECK,
246  SQLCOM_FLUSH,
247  SQLCOM_KILL,
248  SQLCOM_ANALYZE,
249  SQLCOM_ROLLBACK,
250  SQLCOM_ROLLBACK_TO_SAVEPOINT,
251  SQLCOM_COMMIT,
252  SQLCOM_SAVEPOINT,
253  SQLCOM_RELEASE_SAVEPOINT,
254  SQLCOM_BEGIN,
255  SQLCOM_RENAME_TABLE,
256  SQLCOM_SHOW_WARNS,
257  SQLCOM_EMPTY_QUERY,
258  SQLCOM_SHOW_ERRORS,
259  SQLCOM_CHECKSUM,
260  /*
261  When a command is added here, be sure it's also added in mysqld.cc
262  in "struct show_var_st status_vars[]= {" ...
263  */
264  /* This should be the last !!! */
265  SQLCOM_END
266 };
267 
268 enum enum_duplicates
269 {
270  DUP_ERROR,
271  DUP_REPLACE,
272  DUP_UPDATE
273 };
274 
275 enum drizzle_exit_codes
276 {
277  EXIT_UNSPECIFIED_ERROR = 1,
278  EXIT_UNKNOWN_OPTION,
279  EXIT_AMBIGUOUS_OPTION,
280  EXIT_NO_ARGUMENT_ALLOWED,
281  EXIT_ARGUMENT_REQUIRED,
282  EXIT_VAR_PREFIX_NOT_UNIQUE,
283  EXIT_UNKNOWN_VARIABLE,
284  EXIT_OUT_OF_MEMORY,
285  EXIT_UNKNOWN_SUFFIX,
286  EXIT_NO_PTR_TO_VARIABLE,
287  EXIT_CANNOT_CONNECT_TO_SERVICE,
288  EXIT_OPTION_DISABLED,
289  EXIT_ARGUMENT_INVALID
290 };
291 
292 
293 } /* namespace drizzled */
294