~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_table.h

Merged in latest plugin-slot-reorg.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLED_STATEMENT_CREATE_TABLE_H
22
22
#define DRIZZLED_STATEMENT_CREATE_TABLE_H
23
23
 
24
 
#include "drizzled/statement.h"
25
 
#include "drizzled/foreign_key.h"
 
24
#include <drizzled/statement.h>
 
25
 
 
26
class Session;
26
27
 
27
28
namespace drizzled
28
29
{
29
 
class Session;
30
 
 
31
30
namespace statement
32
31
{
33
32
 
34
33
class CreateTable : public Statement
35
34
{
36
 
  virtual bool check(const TableIdentifier&);
37
 
 
38
35
public:
39
36
  CreateTable(Session *in_session)
40
37
    :
41
 
      Statement(in_session),
42
 
      is_create_table_like(false),
43
 
      is_if_not_exists(false),
44
 
      is_engine_set(false)
 
38
      Statement(in_session)
45
39
  {
46
40
    memset(&create_info, 0, sizeof(create_info));
47
41
  }
48
42
 
49
43
  bool execute();
50
 
  message::Table create_table_message;
51
 
  message::Table &createTableMessage()
52
 
  {
53
 
    return create_table_message;
54
 
  };
55
 
  message::Table::Field *current_proto_field;
 
44
  drizzled::message::Table create_table_proto;
56
45
  HA_CREATE_INFO create_info;
57
46
  AlterInfo alter_info;
58
47
  KEY_CREATE_INFO key_create_info;
59
 
  message::Table::ForeignKeyConstraint::ForeignKeyMatchOption fk_match_option;
60
 
  message::Table::ForeignKeyConstraint::ForeignKeyOption fk_update_opt;
61
 
  message::Table::ForeignKeyConstraint::ForeignKeyOption fk_delete_opt;
 
48
  enum Foreign_key::fk_match_opt fk_match_option;
 
49
  enum Foreign_key::fk_option fk_update_opt;
 
50
  enum Foreign_key::fk_option fk_delete_opt;
62
51
 
63
52
  /* The text in a CHANGE COLUMN clause in ALTER TABLE */
64
53
  char *change;
73
62
 
74
63
  /* Poly-use */
75
64
  LEX_STRING comment;
76
 
 
77
 
  bool is_create_table_like;
78
 
  bool is_if_not_exists;
79
 
  bool is_engine_set;
80
 
 
81
 
  bool validateCreateTableOption();
82
65
};
83
66
 
84
 
} /* namespace statement */
 
67
} /* end namespace statement */
85
68
 
86
 
} /* namespace drizzled */
 
69
} /* end namespace drizzled */
87
70
 
88
71
#endif /* DRIZZLED_STATEMENT_CREATE_TABLE_H */