Drizzled Public API Documentation

select_insert.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 
00021 #pragma once
00022 
00023 #include <drizzled/select_result_interceptor.h>
00024 
00025 namespace drizzled
00026 {
00027 
00028 class select_insert :public select_result_interceptor {
00029  public:
00030   TableList *table_list;
00031   Table *table;
00032   List<Item> *fields;
00033   uint64_t autoinc_value_of_last_inserted_row; // autogenerated or not
00034   CopyInfo info;
00035   bool insert_into_view;
00036   select_insert(TableList *table_list_par,
00037     Table *table_par, List<Item> *fields_par,
00038     List<Item> *update_fields, List<Item> *update_values,
00039     enum_duplicates duplic, bool ignore);
00040   ~select_insert();
00041   int prepare(List<Item> &list, Select_Lex_Unit *u);
00042   virtual int prepare2(void);
00043   bool send_data(List<Item> &items);
00044   virtual void store_values(List<Item> &values);
00045   virtual bool can_rollback_data() { return 0; }
00046   void send_error(drizzled::error_t errcode,const char *err);
00047   bool send_eof();
00048   void abort();
00049   /* not implemented: select_insert is never re-used in prepared statements */
00050   void cleanup();
00051 };
00052 
00053 } /* namespace drizzled */
00054