~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/file_exchange.h

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
21
21
#ifndef DRIZZLED_FILE_EXCHANGE_H
22
22
#define DRIZZLED_FILE_EXCHANGE_H
23
23
 
24
 
#include <drizzled/server_includes.h>
 
24
#include "drizzled/sql_string.h"
 
25
#include "drizzled/memory/sql_alloc.h"
 
26
#include "drizzled/enum.h"
 
27
 
 
28
namespace drizzled
 
29
{
 
30
 
 
31
extern const CHARSET_INFO *default_charset_info;
25
32
 
26
33
static String default_line_term("\n",default_charset_info);
27
34
static String default_escaped("\\",default_charset_info);
33
40
  XXX: We never call destructor for objects of this class.
34
41
*/
35
42
 
36
 
class file_exchange :public Sql_alloc
 
43
class file_exchange :
 
44
  public memory::SqlAlloc
37
45
{
38
46
public:
39
47
  enum enum_filetype filetype; /* load XML, Added by Arnold & Erik */
44
52
  ulong skip_lines;
45
53
  const CHARSET_INFO *cs;
46
54
  file_exchange(char *name, bool flag,
47
 
                enum_filetype filetype_arg= FILETYPE_CSV)
48
 
    :file_name(name), opt_enclosed(0), dumpfile(flag), skip_lines(0)
49
 
  {
50
 
    filetype= filetype_arg;
51
 
    field_term= &default_field_term;
52
 
    enclosed=   line_start= &my_empty_string;
53
 
    line_term=  &default_line_term;
54
 
    escaped=    &default_escaped;
55
 
    cs= NULL;
56
 
  }
 
55
                enum_filetype filetype_arg= FILETYPE_CSV);
57
56
};
58
57
 
59
58
 
 
59
} /* namespace drizzled */
 
60
 
60
61
#endif /* DRIZZLED_FILE_EXCHANGE_H */