1
#ifdef USE_PRAGMA_INTERFACE
2
#pragma interface /* gcc class implementation */
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems
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.
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.
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
6
21
#ifndef DRIZZLED_FIELD_ITERATOR_H
7
22
#define DRIZZLED_FIELD_ITERATOR_H
24
#include <drizzled/sql_alloc.h>
25
#include <drizzled/sql_list.h>
26
#include <drizzled/natural_join_column.h>
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;
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; }
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();