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
1
#ifdef USE_PRAGMA_INTERFACE
2
#pragma interface /* gcc class implementation */
21
6
#ifndef DRIZZLED_FIELD_ITERATOR_H
22
7
#define DRIZZLED_FIELD_ITERATOR_H
24
#include "drizzled/memory/sql_alloc.h"
25
#include <drizzled/sql_list.h>
26
#include <drizzled/natural_join_column.h>
44
22
virtual void next()= 0;
45
23
virtual bool end_of_fields()= 0; /* Return 1 at end of list */
46
24
virtual const char *name()= 0;
47
virtual Item *create_item(Session *)= 0;
25
virtual Item *create_item(THD *)= 0;
48
26
virtual Field *field()= 0;
53
31
Iterator over the fields of a base table, view with temporary
54
32
table, or subquery.
88
66
bool end_of_fields() { return !cur_column_ref; }
89
67
const char *name() { return cur_column_ref->name(); }
90
Item *create_item(Session *session) { return cur_column_ref->create_item(session); }
68
Item *create_item(THD *thd) { return cur_column_ref->create_item(thd); }
91
69
Field *field() { return cur_column_ref->field(); }
92
70
Natural_join_column *column_ref() { return cur_column_ref; }
125
103
const char *name() { return field_it->name(); }
126
104
const char *table_name();
127
105
const char *db_name();
128
Item *create_item(Session *session) { return field_it->create_item(session); }
106
Item *create_item(THD *thd) { return field_it->create_item(thd); }
129
107
Field *field() { return field_it->field(); }
130
108
Natural_join_column *get_or_create_column_ref(TableList *parent_table_ref);
131
109
Natural_join_column *get_natural_column_ref();
134
} /* namespace drizzled */
136
113
#endif /* DRIZZLED_FIELD_ITERATOR_H */