21
21
#ifndef DRIZZLED_STATEMENT_CREATE_TABLE_H
22
22
#define DRIZZLED_STATEMENT_CREATE_TABLE_H
24
#include "drizzled/statement.h"
25
#include "drizzled/foreign_key.h"
24
#include <drizzled/statement.h>
31
30
namespace statement
34
33
class CreateTable : public Statement
36
virtual bool check(const TableIdentifier&);
39
36
CreateTable(Session *in_session)
41
Statement(in_session),
42
is_create_table_like(false),
43
is_if_not_exists(false),
46
40
memset(&create_info, 0, sizeof(create_info));
50
message::Table create_table_message;
51
message::Table &createTableMessage()
53
return create_table_message;
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;
63
52
/* The text in a CHANGE COLUMN clause in ALTER TABLE */
75
64
LEX_STRING comment;
77
bool is_create_table_like;
78
bool is_if_not_exists;
81
bool validateCreateTableOption();
84
} /* namespace statement */
67
} /* end namespace statement */
86
} /* namespace drizzled */
69
} /* end namespace drizzled */
88
71
#endif /* DRIZZLED_STATEMENT_CREATE_TABLE_H */