~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement.h

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#pragma once
 
21
#ifndef DRIZZLED_STATEMENT_H
 
22
#define DRIZZLED_STATEMENT_H
22
23
 
23
24
#include <drizzled/definitions.h>
24
25
#include <drizzled/error.h>
26
27
#include <drizzled/sql_base.h>
27
28
#include <drizzled/show.h>
28
29
 
29
 
namespace drizzled {
30
 
namespace statement {
 
30
namespace drizzled
 
31
{
 
32
 
 
33
class Session;
 
34
class TableList;
 
35
class Item;
 
36
 
 
37
namespace statement
 
38
{
31
39
 
32
40
/**
33
41
 * @class Statement
36
44
class Statement
37
45
{
38
46
public:
39
 
  Statement(Session *in_session) :
40
 
    _session(*in_session)
 
47
  Statement(Session *in_session) : 
 
48
    _session(in_session)
41
49
  {}
42
50
 
43
51
  virtual ~Statement() {}
44
52
 
45
 
  void set_command(enum_sql_command);
46
 
  LEX& lex();
47
 
  session::Transactions& transaction();
48
 
 
49
53
  /**
50
54
   * Execute the statement.
51
55
   *
60
64
    return false;
61
65
  }
62
66
 
63
 
  Session& session() const
 
67
  Session *getSession()
 
68
  {
 
69
    return _session;
 
70
  }
 
71
 
 
72
  Session *getSession() const
64
73
  {
65
74
    return _session;
66
75
  }
68
77
  virtual bool isShow() { return false; }
69
78
 
70
79
private:
71
 
  Session& _session;
 
80
  /**
 
81
   * A session handler.
 
82
   */
 
83
  Session *_session;
72
84
};
73
85
 
74
86
} /* namespace statement */
 
87
 
75
88
} /* namespace drizzled */
76
89
 
 
90
#endif /* DRIZZLED_STATEMENT_H */