Drizzled Public API Documentation

alter_info.h
00001 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Copyright (C) 2009 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; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019  */
00020 
00025 #pragma once
00026 
00027 #include <drizzled/alter_column.h>
00028 #include <drizzled/base.h>
00029 #include <drizzled/enum.h>
00030 #include <drizzled/key.h>
00031 #include <drizzled/message/table.pb.h>
00032 
00033 #include <bitset>
00034 #include <list>
00035 
00036 namespace drizzled {
00037 
00038 enum enum_alter_info_flags
00039 {
00040   ALTER_ADD_COLUMN= 0,
00041   ALTER_DROP_COLUMN,
00042   ALTER_CHANGE_COLUMN,
00043   ALTER_COLUMN_STORAGE,
00044   ALTER_COLUMN_FORMAT,
00045   ALTER_COLUMN_ORDER,
00046   ALTER_ADD_INDEX,
00047   ALTER_DROP_INDEX,
00048   ALTER_RENAME,
00049   ALTER_ORDER,
00050   ALTER_OPTIONS,
00051   ALTER_COLUMN_DEFAULT,
00052   ALTER_KEYS_ONOFF,
00053   ALTER_STORAGE,
00054   ALTER_ROW_FORMAT,
00055   ALTER_CONVERT,
00056   ALTER_FORCE,
00057   ALTER_RECREATE,
00058   ALTER_TABLE_REORG,
00059   ALTER_FOREIGN_KEY
00060 };
00061 
00068 class AlterInfo : boost::noncopyable
00069 {
00070 public:
00071   typedef std::list<AlterColumn> alter_list_t;
00072 
00073   alter_list_t alter_list;
00074   List<Key> key_list;
00075   List<CreateField> create_list;
00076   message::AddedFields added_fields_proto;
00077   std::bitset<32> flags;
00078   uint32_t no_parts;
00079   bool error_if_not_empty;
00080 
00081   AlterInfo();
00082   AlterInfo(const AlterInfo&, memory::Root*);
00083 };
00084 
00085 } /* namespace drizzled */
00086