drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
sql_parse.h
1/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3 *
4 * Copyright (C) 2008 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; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#pragma once
21
22#include <string>
23
25#include <drizzled/common.h>
26#include <drizzled/comp_creator.h>
27#include <drizzled/identifier.h>
28
29#include <drizzled/error_t.h>
30#include <drizzled/visibility.h>
31
32namespace drizzled {
33
34DRIZZLED_API const std::string& getCommandName(const enum_server_command& command);
35
36bool execute_sqlcom_select(Session*, TableList *all_tables);
37bool insert_select_prepare(Session*);
38bool update_precheck(Session*, TableList *tables);
39bool delete_precheck(Session*, TableList *tables);
40bool insert_precheck(Session*, TableList *tables);
41
43
44bool check_identifier_name(str_ref, error_t err_code= EE_OK);
45
46bool check_string_byte_length(str_ref, const char *err_msg, uint32_t max_byte_length);
47bool check_string_char_length(str_ref, const char *err_msg, uint32_t max_char_length, const charset_info_st*, bool no_error);
48
49bool test_parse_for_slave(Session*, char *inBuf, uint32_t length);
50
51void reset_session_for_next_command(Session*);
52
53void create_select_for_variable(Session*, const char *var_name);
54
55void init_update_queries();
56
57bool dispatch_command(enum_server_command, Session&, str_ref);
58
60
61void init_select(LEX*);
62bool new_select(LEX*, bool move_down);
63
64int prepare_new_schema_table(Session*, LEX&, const std::string& schema_table_name);
65
67 chooser_compare_func_creator cmp,
68 bool all,
69 Select_Lex *select_lex);
70
71char* query_table_status(Session*,const char *db,const char *table_name);
72
73bool parse_sql(Session *session, Lex_input_stream *lip);
74
75} /* namespace drizzled */
76
void create_select_for_variable(Session *session, const char *var_name)
Definition sql_parse.cc:714
bool insert_precheck(Session *session, TableList *)
bool check_simple_select(Session *session)
bool update_precheck(Session *session, TableList *)
bool dispatch_command(enum_server_command command, Session &session, str_ref packet)
Definition sql_parse.cc:189
Item * negate_expression(Session *session, Item *expr)
Item * all_any_subquery_creator(Item *left_expr, chooser_compare_func_creator cmp, bool all, Select_Lex *select_lex)
TODO: Rename this file - func.h is stupid.
Visibility Control Macros.
#define DRIZZLED_API
Definition visibility.h:38