~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/select_result.h

  • Committer: Brian Aker
  • Date: 2009-08-18 07:20:29 UTC
  • mfrom: (1117.1.9 merge)
  • Revision ID: brian@gaz-20090818072029-s9ch5lcmltxwidn7
Merge of Brian

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) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 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
21
21
#ifndef DRIZZLED_SELECT_RESULT_H
22
22
#define DRIZZLED_SELECT_RESULT_H
23
23
 
24
 
#include <drizzled/current_session.h>
25
 
 
26
 
namespace drizzled
27
 
{
28
 
 
29
 
class Join;
30
 
class Select_Lex_Unit;
31
 
 
32
 
class select_result :public memory::SqlAlloc {
 
24
class select_result :public Sql_alloc {
33
25
protected:
34
26
  Session *session;
35
27
  Select_Lex_Unit *unit;
36
 
 
37
28
public:
38
29
  select_result()
39
30
  {
40
31
    session= current_session;
41
32
  }
42
 
  virtual ~select_result() {}
 
33
  virtual ~select_result() {};
43
34
  virtual int prepare(List<Item> &,
44
35
                      Select_Lex_Unit *u)
45
36
  {
55
46
  { return fields.elements; }
56
47
  virtual bool send_fields(List<Item> &list)=0;
57
48
  virtual bool send_data(List<Item> &items)=0;
58
 
  virtual bool initialize_tables (Join *)
 
49
  virtual bool initialize_tables (JOIN *)
59
50
  { return 0; }
60
51
  virtual bool send_eof()=0;
61
52
  virtual void abort() {}
66
57
   ** Functions to provide a interface to select results
67
58
   *****************************************************************************/
68
59
 
69
 
  virtual void send_error(drizzled::error_t errcode, const char *err);
 
60
  virtual void send_error(uint32_t errcode, const char *err)
 
61
  {
 
62
    my_message(errcode, err, MYF(0));
 
63
  }
70
64
 
71
65
  /*
72
66
    Cleanup instance of this class for next execution of a prepared
79
73
 
80
74
};
81
75
 
82
 
} /* namespace drizzled */
83
 
 
84
76
#endif /* DRIZZLED_SELECT_RESULT_H */