~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field_iterator.h

Tags: innodb-plugin-1.0.1
Imported 1.0.1 with clean - with no changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifdef USE_PRAGMA_INTERFACE
2
 
#pragma interface                       /* gcc class implementation */
3
 
#endif
 
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
 *
 
4
 *  Copyright (C) 2008 Sun Microsystems
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; version 2 of the License.
 
9
 *
 
10
 *  This program is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with this program; if not, write to the Free Software
 
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 */
4
19
 
5
20
 
6
21
#ifndef DRIZZLED_FIELD_ITERATOR_H
7
22
#define DRIZZLED_FIELD_ITERATOR_H
8
23
 
 
24
#include <drizzled/sql_alloc.h>
 
25
#include <drizzled/sql_list.h>
 
26
#include <drizzled/natural_join_column.h>
 
27
 
9
28
class Table;
10
29
class TableList;
11
30
 
22
41
  virtual void next()= 0;
23
42
  virtual bool end_of_fields()= 0;              /* Return 1 at end of list */
24
43
  virtual const char *name()= 0;
25
 
  virtual Item *create_item(THD *)= 0;
 
44
  virtual Item *create_item(Session *)= 0;
26
45
  virtual Field *field()= 0;
27
46
};
28
47
 
42
61
  void next() { ptr++; }
43
62
  bool end_of_fields() { return *ptr == 0; }
44
63
  const char *name();
45
 
  Item *create_item(THD *thd);
 
64
  Item *create_item(Session *session);
46
65
  Field *field() { return *ptr; }
47
66
};
48
67
 
65
84
  void next();
66
85
  bool end_of_fields() { return !cur_column_ref; }
67
86
  const char *name() { return cur_column_ref->name(); }
68
 
  Item *create_item(THD *thd) { return cur_column_ref->create_item(thd); }
 
87
  Item *create_item(Session *session) { return cur_column_ref->create_item(session); }
69
88
  Field *field() { return cur_column_ref->field(); }
70
89
  Natural_join_column *column_ref() { return cur_column_ref; }
71
90
};
103
122
  const char *name() { return field_it->name(); }
104
123
  const char *table_name();
105
124
  const char *db_name();
106
 
  Item *create_item(THD *thd) { return field_it->create_item(thd); }
 
125
  Item *create_item(Session *session) { return field_it->create_item(session); }
107
126
  Field *field() { return field_it->field(); }
108
127
  Natural_join_column *get_or_create_column_ref(TableList *parent_table_ref);
109
128
  Natural_join_column *get_natural_column_ref();