Drizzled Public API Documentation

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 
24 #include <drizzled/definitions.h>
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 
32 namespace drizzled {
33 
34 DRIZZLED_API const std::string& getCommandName(const enum_server_command& command);
35 
36 bool execute_sqlcom_select(Session*, TableList *all_tables);
37 bool insert_select_prepare(Session*);
38 bool update_precheck(Session*, TableList *tables);
39 bool delete_precheck(Session*, TableList *tables);
40 bool insert_precheck(Session*, TableList *tables);
41 
42 Item *negate_expression(Session*, Item *expr);
43 
44 bool check_identifier_name(str_ref, error_t err_code= EE_OK);
45 
46 bool check_string_byte_length(str_ref, const char *err_msg, uint32_t max_byte_length);
47 bool check_string_char_length(str_ref, const char *err_msg, uint32_t max_char_length, const charset_info_st*, bool no_error);
48 
49 bool test_parse_for_slave(Session*, char *inBuf, uint32_t length);
50 
51 void reset_session_for_next_command(Session*);
52 
53 void create_select_for_variable(Session*, const char *var_name);
54 
55 void init_update_queries();
56 
57 bool dispatch_command(enum_server_command command, Session*, const char* packet, uint32_t packet_length);
58 
59 bool check_simple_select(Session*);
60 
61 void init_select(LEX*);
62 bool new_select(LEX*, bool move_down);
63 
64 int prepare_new_schema_table(Session*, LEX&, const std::string& schema_table_name);
65 
66 Item * all_any_subquery_creator(Item *left_expr,
67  chooser_compare_func_creator cmp,
68  bool all,
69  Select_Lex *select_lex);
70 
71 char* query_table_status(Session*,const char *db,const char *table_name);
72 
73 } /* namespace drizzled */
74