00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #pragma once
00022
00023 #include <drizzled/copy_info.h>
00024 #include <drizzled/select_result_interceptor.h>
00025
00026 namespace drizzled {
00027
00028 class select_insert :public select_result_interceptor
00029 {
00030 public:
00031 TableList *table_list;
00032 Table *table;
00033 List<Item> *fields;
00034 uint64_t autoinc_value_of_last_inserted_row;
00035 CopyInfo info;
00036 bool insert_into_view;
00037 select_insert(TableList *table_list_par,
00038 Table *table_par, List<Item> *fields_par,
00039 List<Item> *update_fields, List<Item> *update_values,
00040 enum_duplicates duplic, bool ignore);
00041 ~select_insert();
00042 int prepare(List<Item> &list, Select_Lex_Unit *u);
00043 virtual int prepare2(void);
00044 bool send_data(List<Item> &items);
00045 virtual void store_values(List<Item> &values);
00046 virtual bool can_rollback_data() { return 0; }
00047 void send_error(drizzled::error_t errcode,const char *err);
00048 bool send_eof();
00049 void abort();
00050
00051 void cleanup();
00052 };
00053
00054 }
00055