namespace sql
{
///////////////////////////////////////////////////////////////////////////////////
-
+
+ // Column Type
template <typename COLUMN_NAME, typename DATA_TYPE, typename OPTIONS=EmptyType>
class create_table_column_ : public seq<
COLUMN_NAME, _char::space,
{
};
+ ///////////////////////////////////
+
+ // TEMPORARY
+ template <bool _IsTemporary> // is true
+ class _temporary : public seq<_op_names::temporary, _char::space>
+ {
+ };
+ template <>
+ class _temporary<false> : public empty
+ {
+ };
+
+ // IF NOT EXISTS
+ template <bool _IsExistNotCreate> // is true
+ class _if_not_exists : public seq<_op_names::if_not_exists, _char::space>
+ {
+ };
+ template <> // is true
+ class _if_not_exists<false> : public empty
+ {
+ };
+
+
///////////////////////////////////////////////////////////////////////////
}
}
///////////////////////////////////////////////////////////////////////////////////
// CREATE TABLE
- template <typename TABLE_NAME, typename COLUMNS>
+ template <typename TABLE_NAME, typename COLUMNS,
+ bool _IsTemporary=false, bool _IsExistNotCreate=false>
class create_table_ : public seq<
- _op_names::create, _char::space, _op_names::table, _char::space, // CREATE TABLE
+ _op_names::create, _char::space, _temporary<_IsTemporary>, // CREATE [TEMPORARY]
+ _op_names::table, _char::space, _if_not_exists<_IsExistNotCreate>, // TABLE [IF NOT EXISTS]
TABLE_NAME, _char::space, _char::lpare, COLUMNS, _char::rpare> // <TABLE NAME> (<COLUMNS>)
{
};