Drizzled Public API Documentation

sql_parse.h
00001 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Copyright (C) 2008 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; version 2 of the License.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018  */
00019 
00020 #pragma once
00021 
00022 #include <string>
00023 
00024 #include <drizzled/definitions.h>
00025 #include <drizzled/common.h>
00026 #include <drizzled/comp_creator.h>
00027 #include <drizzled/identifier.h>
00028 
00029 #include <drizzled/error_t.h>
00030 #include <drizzled/visibility.h>
00031 
00032 namespace drizzled {
00033 
00034 DRIZZLED_API const std::string& getCommandName(const enum_server_command& command);
00035 
00036 bool execute_sqlcom_select(Session*, TableList *all_tables);
00037 bool insert_select_prepare(Session*);
00038 bool update_precheck(Session*, TableList *tables);
00039 bool delete_precheck(Session*, TableList *tables);
00040 bool insert_precheck(Session*, TableList *tables);
00041 
00042 Item *negate_expression(Session*, Item *expr);
00043 
00044 bool check_identifier_name(str_ref, error_t err_code= EE_OK);
00045 
00046 bool check_string_byte_length(str_ref, const char *err_msg, uint32_t max_byte_length);
00047 bool check_string_char_length(str_ref, const char *err_msg, uint32_t max_char_length, const charset_info_st*, bool no_error);
00048 
00049 bool test_parse_for_slave(Session*, char *inBuf, uint32_t length);
00050 
00051 void reset_session_for_next_command(Session*);
00052 
00053 void create_select_for_variable(Session*, const char *var_name);
00054 
00055 void init_update_queries();
00056 
00057 bool dispatch_command(enum_server_command command, Session*, const char* packet, uint32_t packet_length);
00058 
00059 bool check_simple_select(Session*);
00060 
00061 void init_select(LEX*);
00062 bool new_select(LEX*, bool move_down);
00063 
00064 int prepare_new_schema_table(Session*, LEX&, const std::string& schema_table_name);
00065 
00066 Item * all_any_subquery_creator(Item *left_expr,
00067                                 chooser_compare_func_creator cmp,
00068                                 bool all,
00069                                 Select_Lex *select_lex);
00070 
00071 char* query_table_status(Session*,const char *db,const char *table_name);
00072 
00073 } /* namespace drizzled */
00074