12
12
You should have received a copy of the GNU General Public License
13
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16
16
#ifndef DRIZZLED_PARSER_H
17
17
#define DRIZZLED_PARSER_H
21
21
#include <drizzled/function/locate.h>
22
22
#include <drizzled/function/str/char.h>
23
23
#include <drizzled/function/str/collation.h>
24
#include <drizzled/function/str/database.h>
24
25
#include <drizzled/function/str/insert.h>
25
26
#include <drizzled/function/str/left.h>
26
27
#include <drizzled/function/str/repeat.h>
27
28
#include <drizzled/function/str/replace.h>
29
#include <drizzled/function/str/reverse.h>
28
30
#include <drizzled/function/str/right.h>
29
31
#include <drizzled/function/str/set_collation.h>
32
#include <drizzled/function/str/substr.h>
30
33
#include <drizzled/function/str/trim.h>
34
#include <drizzled/function/str/user.h>
35
#include <drizzled/function/str/weight_string.h>
31
37
#include <drizzled/function/time/curdate.h>
32
38
#include <drizzled/function/time/date_add_interval.h>
33
39
#include <drizzled/function/time/dayofmonth.h>
66
72
#include <drizzled/statement/alter_schema.h>
67
73
#include <drizzled/statement/alter_table.h>
68
74
#include <drizzled/statement/analyze.h>
69
#include <drizzled/statement/catalog.h>
70
75
#include <drizzled/statement/change_schema.h>
71
76
#include <drizzled/statement/check.h>
77
#include <drizzled/statement/checksum.h>
72
78
#include <drizzled/statement/commit.h>
73
79
#include <drizzled/statement/create_index.h>
74
80
#include <drizzled/statement/create_schema.h>
75
81
#include <drizzled/statement/create_table.h>
76
#include <drizzled/statement/create_table/like.h>
77
#include <drizzled/statement/create_table/select.h>
78
82
#include <drizzled/statement/delete.h>
79
83
#include <drizzled/statement/drop_index.h>
80
84
#include <drizzled/statement/drop_schema.h>
81
85
#include <drizzled/statement/drop_table.h>
82
86
#include <drizzled/statement/empty_query.h>
83
#include <drizzled/statement/execute.h>
84
87
#include <drizzled/statement/flush.h>
85
88
#include <drizzled/statement/insert.h>
86
89
#include <drizzled/statement/insert_select.h>
94
97
#include <drizzled/statement/rollback_to_savepoint.h>
95
98
#include <drizzled/statement/savepoint.h>
96
99
#include <drizzled/statement/select.h>
97
#include <drizzled/statement/show.h>
98
100
#include <drizzled/statement/set_option.h>
101
#include <drizzled/statement/show_create.h>
102
#include <drizzled/statement/show_create_schema.h>
99
103
#include <drizzled/statement/show_errors.h>
104
#include <drizzled/statement/show_processlist.h>
105
#include <drizzled/statement/show_status.h>
100
106
#include <drizzled/statement/show_warnings.h>
101
107
#include <drizzled/statement/start_transaction.h>
102
108
#include <drizzled/statement/truncate.h>
108
114
#include "drizzled/charset.h"
109
115
#include "drizzled/internal/m_string.h"
111
#include "drizzled/item/boolean.h"
129
Item* handle_sql2003_note184_exception(Session *session, Item* left, bool equal, Item *expr);
130
bool add_select_to_union_list(Session *session, LEX *lex, bool is_union_distinct);
131
bool setup_select_in_parentheses(Session *session, LEX *lex);
132
Item* reserved_keyword_function(Session *session, const std::string &name, List<Item> *item_list);
133
void my_parse_error(Lex_input_stream *lip);
134
void my_parse_error(const char *message);
135
bool check_reserved_words(LEX_STRING *name);
136
void errorOn(const char *s);
139
bool buildOrderBy(LEX *lex);
140
void buildEngineOption(LEX *lex, const char *key, const LEX_STRING &value);
141
void buildEngineOption(LEX *lex, const char *key, uint64_t value);
142
void buildSchemaOption(LEX *lex, const char *key, const LEX_STRING &value);
143
void buildSchemaOption(LEX *lex, const char *key, uint64_t value);
144
bool checkFieldIdent(LEX *lex, const LEX_STRING &schema_name, const LEX_STRING &table_name);
146
Item *buildIdent(LEX *lex, const LEX_STRING &schema_name, const LEX_STRING &table_name, const LEX_STRING &field_name);
147
Item *buildTableWild(LEX *lex, const LEX_STRING &schema_name, const LEX_STRING &table_name);
149
void buildCreateFieldIdent(LEX *lex);
151
void storeAlterColumnPosition(LEX *lex, const char *position);
153
bool buildCollation(LEX *lex, const CHARSET_INFO *arg);
154
void buildKey(LEX *lex, Key::Keytype type_par, const lex_string_t &name_arg);
155
void buildForeignKey(LEX *lex, const lex_string_t &name_arg, drizzled::Table_ident *table);
157
drizzled::enum_field_types buildIntegerColumn(LEX *lex, drizzled::enum_field_types final_type, const bool is_unsigned);
158
drizzled::enum_field_types buildSerialColumn(LEX *lex);
159
drizzled::enum_field_types buildVarcharColumn(LEX *lex, const char *length);
160
drizzled::enum_field_types buildVarbinaryColumn(LEX *lex, const char *length);
161
drizzled::enum_field_types buildBlobColumn(LEX *lex);
162
drizzled::enum_field_types buildBooleanColumn(LEX *lex);
163
drizzled::enum_field_types buildUuidColumn(LEX *lex);
164
drizzled::enum_field_types buildDoubleColumn(LEX *lex);
165
drizzled::enum_field_types buildTimestampColumn(LEX *lex, const char *length);
166
drizzled::enum_field_types buildDecimalColumn(LEX *lex);
168
void buildKeyOnColumn(LEX *lex);
169
void buildAutoOnColumn(LEX *lex);
170
void buildPrimaryOnColumn(LEX *lex);
172
} // namespace parser
173
} // namespace drizzled
175
117
#endif /* DRIZZLED_PARSER_H */