~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/alter_info.h

  • Committer: Stewart Smith
  • Date: 2010-02-22 07:44:37 UTC
  • mfrom: (1283.17.4)
  • mto: (1283.19.1)
  • mto: This revision was merged to the branch mainline in revision 1449.
  • Revision ID: stewart@flamingspork.com-20100222074437-1a9x1n030tbtv1qv
Merged embeddded-innodb-store-table-proto into embedded-innodb-write-row.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2009 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2009 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
22
22
 * @file Declaration of the AlterInfo class
23
23
 */
24
24
 
25
 
#pragma once
 
25
#ifndef DRIZZLED_ALTER_INFO_H
 
26
#define DRIZZLED_ALTER_INFO_H
26
27
 
27
 
#include <drizzled/alter_column.h>
28
 
#include <drizzled/base.h>
29
 
#include <drizzled/enum.h>
30
 
#include <drizzled/key.h>
31
 
#include <drizzled/message/table.pb.h>
 
28
#include "drizzled/base.h"
 
29
#include "drizzled/enum.h"
 
30
#include "drizzled/sql_list.h" /** @TODO use STL vectors! */
 
31
#include "drizzled/key.h"
 
32
#include "drizzled/message/table.pb.h"
32
33
 
33
34
#include <bitset>
34
 
#include <list>
35
 
 
36
 
namespace drizzled {
 
35
 
 
36
namespace drizzled
 
37
{
 
38
 
 
39
/* Some forward declarations needed */
 
40
class CreateField;
 
41
class AlterDrop;
 
42
class AlterColumn;
37
43
 
38
44
enum enum_alter_info_flags
39
45
{
59
65
  ALTER_FOREIGN_KEY
60
66
};
61
67
 
 
68
enum tablespace_op_type
 
69
{
 
70
  NO_TABLESPACE_OP,
 
71
  DISCARD_TABLESPACE,
 
72
  IMPORT_TABLESPACE
 
73
};
 
74
 
62
75
/**
63
76
 * Contains information about the parsed CREATE or ALTER TABLE statement.
64
77
 *
65
78
 * This structure contains a list of columns or indexes to be created,
66
79
 * altered or dropped.
67
80
 */
68
 
class AlterInfo : boost::noncopyable
 
81
class AlterInfo
69
82
{
70
83
public:
71
 
  typedef std::list<AlterColumn> alter_list_t;
72
 
 
73
 
  alter_list_t alter_list;
 
84
  List<AlterDrop> drop_list;
 
85
  List<AlterColumn> alter_list;
74
86
  List<Key> key_list;
75
87
  List<CreateField> create_list;
76
 
  message::AddedFields added_fields_proto;
 
88
  message::AlterTable alter_proto;
77
89
  std::bitset<32> flags;
 
90
  enum enum_enable_or_disable keys_onoff;
 
91
  enum tablespace_op_type tablespace_op;
78
92
  uint32_t no_parts;
 
93
  enum ha_build_method build_method;
 
94
  CreateField *datetime_field;
79
95
  bool error_if_not_empty;
80
96
 
81
97
  AlterInfo();
82
 
  AlterInfo(const AlterInfo&, memory::Root*);
 
98
  AlterInfo(const AlterInfo &rhs, memory::Root *mem_root);
 
99
private:
 
100
  AlterInfo &operator=(const AlterInfo &rhs); // not implemented
 
101
  AlterInfo(const AlterInfo &rhs);            // not implemented
83
102
};
84
103
 
85
104
} /* namespace drizzled */
86
105
 
 
106
#endif /* DRIZZLED_ALTER_INFO_H */