~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement.h

Merge Stewart's dead code removal

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2009 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2009 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
27
27
#include <drizzled/sql_base.h>
28
28
#include <drizzled/show.h>
29
29
 
30
 
namespace drizzled
31
 
{
32
 
 
33
30
class Session;
34
31
class TableList;
35
32
class Item;
36
33
 
 
34
namespace drizzled
 
35
{
37
36
namespace statement
38
37
{
39
38
 
44
43
class Statement
45
44
{
46
45
public:
47
 
  Statement(Session *in_session) : 
48
 
    _session(in_session)
 
46
  Statement(Session *in_session)
 
47
    : 
 
48
      session(in_session)
49
49
  {}
50
50
 
51
51
  virtual ~Statement() {}
57
57
   */
58
58
  virtual bool execute()= 0;
59
59
 
60
 
  /* True if can be in transaction. Currently only DDL is not.
61
 
     This should go away when DDL commands are within transactions. */
62
 
  virtual bool isTransactional()
63
 
  {
64
 
    return false;
65
 
  }
66
 
 
67
 
  Session *getSession()
68
 
  {
69
 
    return _session;
70
 
  }
71
 
 
72
 
  Session *getSession() const
73
 
  {
74
 
    return _session;
75
 
  }
76
 
 
77
 
  virtual bool isShow() { return false; }
78
 
 
79
 
private:
 
60
protected:
 
61
 
80
62
  /**
81
63
   * A session handler.
82
64
   */
83
 
  Session *_session;
 
65
  Session *session;
84
66
};
85
67
 
86
 
} /* namespace statement */
 
68
} /* end namespace statement */
87
69
 
88
 
} /* namespace drizzled */
 
70
} /* end namespace drizzled */
89
71
 
90
72
#endif /* DRIZZLED_STATEMENT_H */