~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement.h

  • Committer: Brian Aker
  • Date: 2009-08-17 00:51:17 UTC
  • mfrom: (1115.3.4 captain)
  • Revision ID: brian@gaz-20090817005117-j9der2dkee8pwbw5
Merge Jay

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