1/* Copyright (C) 2016 Kentoku Shiba
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; version 2 of the License.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
15
16#ifdef SPIDER_HAS_GROUP_BY_HANDLER
17class spider_group_by_handler: public group_by_handler
18{
19 Query query;
20 spider_fields *fields;
21 ha_spider *spider;
22 SPIDER_TRX *trx;
23 spider_db_result *result;
24 bool first;
25 longlong offset_limit;
26 int store_error;
27
28public:
29 spider_group_by_handler(
30 THD *thd_arg,
31 Query *query_arg,
32 spider_fields *fields_arg
33 );
34 ~spider_group_by_handler();
35 int init_scan();
36 int next_row();
37 int end_scan();
38};
39
40group_by_handler *spider_create_group_by_handler(
41 THD *thd,
42 Query *query
43);
44#endif
45