~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/execute.h

  • Committer: Brian Aker
  • Date: 2010-10-15 00:10:43 UTC
  • mto: This revision was merged to the branch mainline in revision 1851.
  • Revision ID: brian@tangent.org-20101015001043-df9lfy4rubdiwa4d
This patch returns dynamic SQL into the core (through SQL-Server syntax).
This will allow us to add back in the test cases that were using
DECLARE/PREPARE syntax (which... was a last minutes decision in 5.0 to allow
so that we could have "dynamic" SQL). 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
 *
 
4
 *  Copyright (C) 2010 Brian Aker
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 */
 
20
 
 
21
#ifndef DRIZZLED_STATEMENT_EXECUTE_H
 
22
#define DRIZZLED_STATEMENT_EXECUTE_H
 
23
 
 
24
#include <drizzled/statement.h>
 
25
 
 
26
namespace drizzled
 
27
{
 
28
class Session;
 
29
 
 
30
namespace statement
 
31
{
 
32
 
 
33
class Execute : public Statement
 
34
{
 
35
  bool is_var;
 
36
  LEX_STRING to_execute;
 
37
 
 
38
  bool parseVariable(void);
 
39
 
 
40
public:
 
41
  Execute(Session *in_session);
 
42
 
 
43
  void setQuery(LEX_STRING &arg)
 
44
  {
 
45
    to_execute= arg;
 
46
  }
 
47
 
 
48
  void setVar()
 
49
  {
 
50
    is_var= true;
 
51
  }
 
52
 
 
53
  bool execute();
 
54
};
 
55
 
 
56
} /* namespace statement */
 
57
 
 
58
} /* namespace drizzled */
 
59
 
 
60
#endif /* DRIZZLED_STATEMENT_EXECUTE_H */