~drizzle-trunk/drizzle/development

850 by Brian Aker
More class creation.
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
4
 *  Copyright (C) 2008 Sun Microsystems
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
21
#ifndef DRIZZLED_SELECT_EXPORT_H
22
#define DRIZZLED_SELECT_EXPORT_H
23
24
/*
25
 List of all possible characters of a numeric value text representation.
26
*/
27
#define NUMERIC_CHARS ".0123456789e+-"
28
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
29
namespace drizzled
30
{
850 by Brian Aker
More class creation.
31
32
class select_export :public select_to_file {
33
  uint32_t field_term_length;
34
  int field_sep_char,escape_char,line_sep_char;
35
  int field_term_char; // first char of FIELDS TERMINATED BY or MAX_INT
36
  /*
37
    The is_ambiguous_field_sep field is true if a value of the field_sep_char
38
    field is one of the 'n', 't', 'r' etc characters
39
    (see the READ_INFO::unescape method and the ESCAPE_CHARS constant value).
40
  */
41
  bool is_ambiguous_field_sep;
42
  /*
43
     The is_ambiguous_field_term is true if field_sep_char contains the first
44
     char of the FIELDS TERMINATED BY (ENCLOSED BY is empty), and items can
45
     contain this character.
46
  */
47
  bool is_ambiguous_field_term;
48
  /*
49
    The is_unsafe_field_sep field is true if a value of the field_sep_char
50
    field is one of the '0'..'9', '+', '-', '.' and 'e' characters
51
    (see the NUMERIC_CHARS constant value).
52
  */
53
  bool is_unsafe_field_sep;
54
  bool fixed_row_size;
55
public:
56
  select_export(file_exchange *ex) :select_to_file(ex) {}
57
  ~select_export();
58
  int prepare(List<Item> &list, Select_Lex_Unit *u);
59
  bool send_data(List<Item> &items);
60
};
61
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
62
} /* namespace drizzled */
63
850 by Brian Aker
More class creation.
64
#endif /* DRIZZLED_SELECT_EXPORT_H */