~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/select_result.h

Cleaned up a few global tests which aren't happy now.

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