Code_data_type.hpp
上传用户:romrleung
上传日期:2022-05-23
资源大小:18897k
文件大小:1k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. /* Copyright (C) 2003 MySQL AB
  2.    This program is free software; you can redistribute it and/or modify
  3.    it under the terms of the GNU General Public License as published by
  4.    the Free Software Foundation; either version 2 of the License, or
  5.    (at your option) any later version.
  6.    This program is distributed in the hope that it will be useful,
  7.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  9.    GNU General Public License for more details.
  10.    You should have received a copy of the GNU General Public License
  11.    along with this program; if not, write to the Free Software
  12.    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
  13. #ifndef ODBC_CODEGEN_Code_data_type_hpp
  14. #define ODBC_CODEGEN_Code_data_type_hpp
  15. #include <common/common.hpp>
  16. #include <common/DataType.hpp>
  17. #include "Code_base.hpp"
  18. /**
  19.  * @class Plan_data_type
  20.  * @brief Data type in DDL statement
  21.  *
  22.  * This is pure plan node.
  23.  */
  24. class Plan_data_type : public Plan_base {
  25. public:
  26.     Plan_data_type(Plan_root* root, const SqlType& sqlType);
  27.     virtual ~Plan_data_type();
  28.     Plan_base* analyze(Ctx& ctx, Ctl& ctl);
  29.     Exec_base* codegen(Ctx& ctx, Ctl& ctl);
  30.     void print(Ctx& ctx);
  31. private:
  32.     friend class Plan_ddl_column;
  33.     SqlType m_sqlType;
  34. };
  35. inline
  36. Plan_data_type::Plan_data_type(Plan_root* root, const SqlType& sqlType) :
  37.     Plan_base(root),
  38.     m_sqlType(sqlType)
  39. {
  40. }
  41. #endif