Drizzled Public API Documentation

enum.h
00001 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Copyright (C) 2009 Sun Microsystems, Inc.
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019  */
00020 
00021 #pragma once
00022 
00023 namespace drizzled
00024 {
00025 
00038 enum Derivation
00039 {
00040   DERIVATION_IGNORABLE= 5,
00041   DERIVATION_COERCIBLE= 4,
00042   DERIVATION_SYSCONST= 3,
00043   DERIVATION_IMPLICIT= 2,
00044   DERIVATION_NONE= 1,
00045   DERIVATION_EXPLICIT= 0
00046 };
00047 
00048 enum enum_parsing_place
00049 {
00050   NO_MATTER,
00051   IN_HAVING,
00052   SELECT_LIST,
00053   IN_WHERE,
00054   IN_ON
00055 };
00056 
00057 enum enum_mysql_completiontype
00058 {
00059   ROLLBACK_RELEASE= -2,
00060   ROLLBACK= 1,
00061   ROLLBACK_AND_CHAIN= 7,
00062   COMMIT_RELEASE= -1,
00063   COMMIT= 0,
00064   COMMIT_AND_CHAIN= 6
00065 };
00066 
00067 enum enum_check_fields
00068 {
00069   CHECK_FIELD_IGNORE,
00070   CHECK_FIELD_WARN,
00071   CHECK_FIELD_ERROR_FOR_NULL
00072 };
00073 
00074 enum sql_var_t
00075 {
00076   OPT_DEFAULT= 0,
00077   OPT_SESSION,
00078   OPT_GLOBAL
00079 };
00080 
00081 enum column_format_type
00082 {
00083   COLUMN_FORMAT_TYPE_NOT_USED= -1,
00084   COLUMN_FORMAT_TYPE_DEFAULT= 0,
00085   COLUMN_FORMAT_TYPE_FIXED= 1,
00086   COLUMN_FORMAT_TYPE_DYNAMIC= 2
00087 };
00088 
00089 
00093 enum enum_table_category
00094 {
00098   TABLE_UNKNOWN_CATEGORY=0,
00099 
00111   TABLE_CATEGORY_TEMPORARY=1,
00112 
00121   TABLE_CATEGORY_USER=2,
00122 
00138   /*
00139     TODO: Fixing the performance issues of I_S will lead
00140     to I_S tables in the table cache, which should use
00141     this table type.
00142   */
00143   TABLE_CATEGORY_INFORMATION
00144 };
00145 
00146 enum enum_mark_columns
00147 {
00148   MARK_COLUMNS_NONE,
00149   MARK_COLUMNS_READ,
00150   MARK_COLUMNS_WRITE
00151 };
00152 
00153 enum enum_filetype
00154 {
00155   FILETYPE_CSV,
00156   FILETYPE_XML
00157 };
00158 
00159 enum find_item_error_report_type
00160 {
00161   REPORT_ALL_ERRORS,
00162   REPORT_EXCEPT_NOT_FOUND,
00163   IGNORE_ERRORS,
00164   REPORT_EXCEPT_NON_UNIQUE,
00165   IGNORE_EXCEPT_NON_UNIQUE
00166 };
00167 
00168 /*
00169   Values in this enum are used to indicate how a tables TIMESTAMP field
00170   should be treated. It can be set to the current timestamp on insert or
00171   update or both.
00172   WARNING: The values are used for bit operations. If you change the
00173   enum, you must keep the bitwise relation of the values. For example:
00174   (int) TIMESTAMP_AUTO_SET_ON_BOTH must be equal to
00175   (int) TIMESTAMP_AUTO_SET_ON_INSERT | (int) TIMESTAMP_AUTO_SET_ON_UPDATE.
00176   We use an enum here so that the debugger can display the value names.
00177 */
00178 enum timestamp_auto_set_type
00179 {
00180   TIMESTAMP_NO_AUTO_SET= 0,
00181   TIMESTAMP_AUTO_SET_ON_INSERT= 1,
00182   TIMESTAMP_AUTO_SET_ON_UPDATE= 2,
00183   TIMESTAMP_AUTO_SET_ON_BOTH= 3
00184 };
00185 
00186 enum enum_ha_read_modes
00187 {
00188   RFIRST,
00189   RNEXT,
00190   RPREV,
00191   RLAST,
00192   RKEY,
00193   RNEXT_SAME
00194 };
00195 
00196 enum enum_tx_isolation
00197 {
00198   ISO_READ_UNCOMMITTED,
00199   ISO_READ_COMMITTED,
00200   ISO_REPEATABLE_READ,
00201   ISO_SERIALIZABLE
00202 };
00203 
00204 
00205 enum SHOW_COMP_OPTION
00206 {
00207   SHOW_OPTION_YES,
00208   SHOW_OPTION_NO,
00209   SHOW_OPTION_DISABLED
00210 };
00211 
00212 /*
00213   When a command is added here, be sure it's also added in mysqld.cc
00214   in "struct show_var_st status_vars[]= {" ...
00215 
00216   If the command returns a result set or is not allowed in stored
00217   functions or triggers, please also make sure that
00218   sp_get_flags_for_command (sp_head.cc) returns proper flags for the
00219   added SQLCOM_.
00220 */
00221 
00222 enum enum_sql_command {
00223   SQLCOM_SELECT,
00224   SQLCOM_CREATE_TABLE,
00225   SQLCOM_CREATE_INDEX,
00226   SQLCOM_ALTER_TABLE,
00227   SQLCOM_UPDATE,
00228   SQLCOM_INSERT,
00229   SQLCOM_INSERT_SELECT,
00230   SQLCOM_DELETE,
00231   SQLCOM_TRUNCATE,
00232   SQLCOM_DROP_TABLE,
00233   SQLCOM_DROP_INDEX,
00234   SQLCOM_SHOW_CREATE,
00235   SQLCOM_SHOW_CREATE_DB,
00236   SQLCOM_LOAD,
00237   SQLCOM_SET_OPTION,
00238   SQLCOM_UNLOCK_TABLES,
00239   SQLCOM_CHANGE_DB,
00240   SQLCOM_CREATE_DB,
00241   SQLCOM_DROP_DB,
00242   SQLCOM_ALTER_DB,
00243   SQLCOM_REPLACE,
00244   SQLCOM_REPLACE_SELECT,
00245   SQLCOM_CHECK,
00246   SQLCOM_FLUSH,
00247   SQLCOM_KILL,
00248   SQLCOM_ANALYZE,
00249   SQLCOM_ROLLBACK,
00250   SQLCOM_ROLLBACK_TO_SAVEPOINT,
00251   SQLCOM_COMMIT,
00252   SQLCOM_SAVEPOINT,
00253   SQLCOM_RELEASE_SAVEPOINT,
00254   SQLCOM_BEGIN,
00255   SQLCOM_RENAME_TABLE,
00256   SQLCOM_SHOW_WARNS,
00257   SQLCOM_EMPTY_QUERY,
00258   SQLCOM_SHOW_ERRORS,
00259   SQLCOM_CHECKSUM,
00260   /*
00261     When a command is added here, be sure it's also added in mysqld.cc
00262     in "struct show_var_st status_vars[]= {" ...
00263   */
00264   /* This should be the last !!! */
00265   SQLCOM_END
00266 };
00267 
00268 enum enum_duplicates
00269 {
00270   DUP_ERROR,
00271   DUP_REPLACE,
00272   DUP_UPDATE
00273 };
00274 
00275 enum drizzle_exit_codes
00276 {
00277   EXIT_UNSPECIFIED_ERROR = 1,
00278   EXIT_UNKNOWN_OPTION,
00279   EXIT_AMBIGUOUS_OPTION,
00280   EXIT_NO_ARGUMENT_ALLOWED,
00281   EXIT_ARGUMENT_REQUIRED,
00282   EXIT_VAR_PREFIX_NOT_UNIQUE,
00283   EXIT_UNKNOWN_VARIABLE,
00284   EXIT_OUT_OF_MEMORY,
00285   EXIT_UNKNOWN_SUFFIX,
00286   EXIT_NO_PTR_TO_VARIABLE,
00287   EXIT_CANNOT_CONNECT_TO_SERVICE,
00288   EXIT_OPTION_DISABLED,
00289   EXIT_ARGUMENT_INVALID
00290 };
00291 
00292 
00293 } /* namespace drizzled */
00294