~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/command.h

  • Committer: Monty Taylor
  • Date: 2009-08-17 18:46:08 UTC
  • mto: (1182.1.1 staging)
  • mto: This revision was merged to the branch mainline in revision 1183.
  • Revision ID: mordred@inaugust.com-20090817184608-0b2emowpjr9m6le7
"Fixed" the deadlock test. I'd still like someone to look at what's going on here.

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
 
#ifndef DRIZZLED_STATEMENT_H
22
 
#define DRIZZLED_STATEMENT_H
 
21
#ifndef DRIZZLED_COMMAND_H
 
22
#define DRIZZLED_COMMAND_H
23
23
 
 
24
#include <drizzled/server_includes.h>
24
25
#include <drizzled/definitions.h>
25
26
#include <drizzled/error.h>
26
27
#include <drizzled/sql_parse.h>
27
28
#include <drizzled/sql_base.h>
28
29
#include <drizzled/show.h>
29
30
 
30
 
namespace drizzled
31
 
{
32
 
 
33
31
class Session;
34
32
class TableList;
35
33
class Item;
36
34
 
37
 
namespace statement
 
35
namespace drizzled
 
36
{
 
37
namespace command
38
38
{
39
39
 
40
40
/**
41
 
 * @class Statement
42
 
 * @brief Represents a statement to be executed
 
41
 * @class SqlCommand
 
42
 * @brief Represents a command to be executed
43
43
 */
44
 
class Statement
 
44
class SqlCommand
45
45
{
46
46
public:
47
 
  Statement(Session *in_session)
48
 
    : 
 
47
  SqlCommand(enum enum_sql_command in_comm_type,
 
48
             Session *in_session)
 
49
    : comm_type(in_comm_type),
49
50
      session(in_session)
50
51
  {}
51
52
 
52
 
  virtual ~Statement() {}
 
53
  virtual ~SqlCommand() {}
53
54
 
54
55
  /**
55
 
   * Execute the statement.
 
56
   * Execute the command.
56
57
   *
57
 
   * @return true on failure; false on success
 
58
   * @return 1 on failure; 0 on success
58
59
   */
59
 
  virtual bool execute()= 0;
 
60
  virtual int execute()= 0;
60
61
 
61
62
protected:
62
63
 
63
64
  /**
 
65
   * The type of this command.
 
66
   */
 
67
  enum enum_sql_command comm_type;
 
68
 
 
69
  /**
64
70
   * A session handler.
65
71
   */
66
72
  Session *session;
67
73
};
68
74
 
69
 
} /* namespace statement */
70
 
 
71
 
} /* namespace drizzled */
72
 
 
73
 
#endif /* DRIZZLED_STATEMENT_H */
 
75
} /* end namespace command */
 
76
 
 
77
} /* end namespace drizzled */
 
78
 
 
79
#endif /* DRIZZLED_COMMAND_H */