{
///////////////////////////////////////////////////////////////////////////////////
- class create_table
+ namespace _char
+ {
+ typedef chars::space space;
+ }
+
+ namespace _op_names
+ {
+ ROAST_LEXICAL_FIXSTR(create,"CREATE");
+ ROAST_LEXICAL_FIXSTR(drop,"DROP");
+ ROAST_LEXICAL_FIXSTR(alter,"ALTER");
+ ROAST_LEXICAL_FIXSTR(rename,"RENAME");
+
+ ROAST_LEXICAL_FIXSTR(table,"TABLE");
+ ROAST_LEXICAL_FIXSTR(to,"TO");
+ }
+
+ ///////////////////////////////////////////////////////////////////////////////////
+
+ // CREATE TABLE
+ template <typename TABLE_NAME, typename COLUMNS>
+ class create_table : public seq<
+ _op_names::create, _char::space, _op_names::table, _char::space, // CREATE TABLE
+ TABLE_NAME, _char::space, _char::lpare, COLUMNS, _char::rpare> // <TABLE NAME> (<COLUMNS>)
+ {
+ };
+
+ ///////////////////////////////////////////////////////////////////////////////////
+
+ // DROP TABLE
+ template <typename TABLE_NAME, typename OPTIONS=EmptyType>
+ class drop_table : public seq<
+ _op_names::drop, _char::space, _op_names::table, _char::space, // DROP TABLE
+ TABLE_NAME> // <TABLE NAME>
{
};
///////////////////////////////////////////////////////////////////////////////////
- class drop_table
+ // ALTER TABLE
+ template <typename TABLE_NAME, typename COLUMNS>
+ class alter_table : public seq<
+ _op_names::alter, _char::space, _op_names::table, _char::space, // ALTER TABLE
+ TABLE_NAME> // <TABLE NAME>
{
};
///////////////////////////////////////////////////////////////////////////////////
- class alter_table
+ // RENAME TABLE
+ template <typename FROM_TABLE_NAME, typename TO_TABLE_NAME>
+ class rename_table : public seq<
+ _op_names::rename, _char::space, _op_names::table, _char::space, // RENAME TABLE
+ TABLE_NAME, _char::space, _op_names::to, _char::space, TO_TABLE_NAME> // <FROM_TABLE_NAME> TO <TO_TABLE_NAME>
{
};