drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
quick_ror_union_select.h
1/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3 *
4 * Copyright (C) 2008-2009 Sun Microsystems, Inc.
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 */
19
20#pragma once
21
22#include <drizzled/optimizer/range.h>
23
24#include <vector>
25
26namespace drizzled {
27namespace optimizer {
28
41class QuickRorUnionSelect : public QuickSelectInterface
42{
43public:
44 QuickRorUnionSelect(Session *session, Table *table);
45 ~QuickRorUnionSelect();
46
56 int init();
57
67 int reset(void);
68
83 int get_next();
84
85 bool reverse_sorted() const
86 {
87 return false;
88 }
89
90 bool unique_key_range() const
91 {
92 return false;
93 }
94
95 int get_type() const
96 {
97 return QS_TYPE_ROR_UNION;
98 }
99
100 void add_keys_and_lengths(std::string *key_names, std::string *used_lengths);
101 void add_info_string(std::string *str);
102 bool is_keys_used(const boost::dynamic_bitset<>& fields);
103
104 void push_quick_back(QuickSelectInterface *quick_sel_range);
105
106 std::vector<QuickSelectInterface *> quick_selects;
107
109 std::priority_queue<QuickSelectInterface *, std::vector<QuickSelectInterface *>, compare_functor > *queue;
111
113 unsigned char *cur_rowid;
114 unsigned char *prev_rowid;
116 uint32_t rowid_length;
117private:
118 bool scans_inited;
119};
120
121} /* namespace optimizer */
122
123} /* namespace drizzled */
124
bool is_keys_used(const boost::dynamic_bitset<> &fields)
void add_keys_and_lengths(std::string *key_names, std::string *used_lengths)
std::priority_queue< QuickSelectInterface *, std::vector< QuickSelectInterface * >, compare_functor > * queue
std::vector< QuickSelectInterface * > quick_selects
TODO: Rename this file - func.h is stupid.