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
21
#ifndef DRIZZLED_SELECT_EXPORT_H
22
#define DRIZZLED_SELECT_EXPORT_H
26
List of all possible characters of a numeric value text representation.
28
#define NUMERIC_CHARS ".0123456789e+-"
31
class select_export :public select_to_file {
32
uint32_t field_term_length;
33
int field_sep_char,escape_char,line_sep_char;
34
int field_term_char; // first char of FIELDS TERMINATED BY or MAX_INT
36
The is_ambiguous_field_sep field is true if a value of the field_sep_char
37
field is one of the 'n', 't', 'r' etc characters
38
(see the READ_INFO::unescape method and the ESCAPE_CHARS constant value).
40
bool is_ambiguous_field_sep;
42
The is_ambiguous_field_term is true if field_sep_char contains the first
43
char of the FIELDS TERMINATED BY (ENCLOSED BY is empty), and items can
44
contain this character.
46
bool is_ambiguous_field_term;
48
The is_unsafe_field_sep field is true if a value of the field_sep_char
49
field is one of the '0'..'9', '+', '-', '.' and 'e' characters
50
(see the NUMERIC_CHARS constant value).
52
bool is_unsafe_field_sep;
55
select_export(file_exchange *ex) :select_to_file(ex) {}
57
int prepare(List<Item> &list, Select_Lex_Unit *u);
58
bool send_data(List<Item> &items);
61
#endif /* DRIZZLED_SELECT_EXPORT_H */