~ubuntu-branches/ubuntu/quantal/mysql-workbench/quantal

« back to all changes in this revision

Viewing changes to modules/db.mysql.sqlparser/src/mysql_sql_semantic_check.h

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2012-03-01 21:57:30 UTC
  • Revision ID: package-import@ubuntu.com-20120301215730-o7y8av8y38n162ro
Tags: upstream-5.2.38+dfsg
ImportĀ upstreamĀ versionĀ 5.2.38+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU General Public License as
 
6
 * published by the Free Software Foundation; version 2 of the
 
7
 * License.
 
8
 * 
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
12
 * GNU General Public License for more details.
 
13
 * 
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 
17
 * 02110-1301  USA
 
18
 */
 
19
 
 
20
 
 
21
#ifndef _MYSQL_SQL_SEMANTIC_CHECK_H_
 
22
#define _MYSQL_SQL_SEMANTIC_CHECK_H_
 
23
 
 
24
 
 
25
#include "mysql_sql_syntax_check.h"
 
26
#include "grtsqlparser/sql_semantic_check.h"
 
27
 
 
28
 
 
29
/** Implements DBMS specifics.
 
30
 * 
 
31
 * @ingroup sqlparser
 
32
 */
 
33
class MYSQL_SQL_PARSER_PUBLIC_FUNC Mysql_sql_semantic_check
 
34
  : virtual protected Mysql_sql_syntax_check, virtual public Sql_semantic_check
 
35
{
 
36
public:
 
37
  typedef boost::shared_ptr<Mysql_sql_semantic_check> Ref;
 
38
  static Ref create(grt::GRT *grt) { return Ref(new Mysql_sql_semantic_check(grt)); }
 
39
protected:
 
40
  Mysql_sql_semantic_check(grt::GRT *grt);
 
41
 
 
42
protected:
 
43
  virtual Parse_result check_sql(const SqlAstNode *tree);
 
44
  virtual Parse_result check_trigger(const SqlAstNode *tree, const SqlAstNode *trigger_tail);
 
45
  virtual Parse_result check_view(const SqlAstNode *tree, const SqlAstNode *view_tail);
 
46
  virtual Parse_result check_routine(const SqlAstNode *tree, const SqlAstNode *routine_tail);
 
47
 
 
48
  class Null_state_keeper : Mysql_sql_syntax_check::Null_state_keeper
 
49
  {
 
50
  public:
 
51
    Null_state_keeper(Mysql_sql_semantic_check *sql_parser)
 
52
      : Mysql_sql_syntax_check::Null_state_keeper(sql_parser), _sql_parser(sql_parser) {}
 
53
    ~Null_state_keeper();
 
54
  private:
 
55
    Mysql_sql_semantic_check *_sql_parser;
 
56
  };
 
57
};
 
58
 
 
59
 
 
60
#endif // _MYSQL_SQL_SEMANTIC_CHECK_H_