drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
quick_ror_intersect_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 <boost/dynamic_bitset.hpp>
25#include <vector>
26
27namespace drizzled
28{
29
30namespace optimizer
31{
32
50class QuickRorIntersectSelect : public QuickSelectInterface
51{
52public:
53
54 QuickRorIntersectSelect(Session *session,
55 Table *table,
56 bool retrieve_full_rows,
57 memory::Root *parent_alloc);
58
59 ~QuickRorIntersectSelect();
60
70 int init();
71
80 int reset(void);
81
101 int get_next();
102
103 bool reverse_sorted() const
104 {
105 return false;
106 }
107
108 bool unique_key_range() const
109 {
110 return false;
111 }
112
113 int get_type() const
114 {
115 return QS_TYPE_ROR_INTERSECT;
116 }
117
118 void add_keys_and_lengths(std::string *key_names, std::string *used_lengths);
119 void add_info_string(std::string *str);
120 bool is_keys_used(const boost::dynamic_bitset<>& fields);
121
132 int init_ror_merged_scan(bool reuse_handler);
133
148 void push_quick_back(QuickRangeSelect *quick_sel_range);
149
154 std::vector<QuickRangeSelect*> quick_selects;
155
161
167};
168
169} /* namespace optimizer */
170
171} /* namespace drizzled */
172
void push_quick_back(QuickRangeSelect *quick_sel_range)
void add_keys_and_lengths(std::string *key_names, std::string *used_lengths)
bool is_keys_used(const boost::dynamic_bitset<> &fields)
TODO: Rename this file - func.h is stupid.