~drizzle-trunk/drizzle/development

383.1.45 by Monty Taylor
libdrizzle.h cleanup. Removed some unused things. Started splitting header into
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, 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
390.1.3 by Monty Taylor
Copyright header fixes.
8
 *  the Free Software Foundation; version 2 of the License.
383.1.45 by Monty Taylor
libdrizzle.h cleanup. Removed some unused things. Started splitting header into
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
779.3.37 by Monty Taylor
Renmaed libdrizzle in the tree to libdrizzleclient to avoid namespace clashes
20
#ifndef LIBDRIZZLECLIENT_DRIZZLE_FIELD_H
21
#define LIBDRIZZLECLIENT_DRIZZLE_FIELD_H
22
23
#include <drizzled/common.h>
24
25
#include <stdint.h>
383.1.45 by Monty Taylor
libdrizzle.h cleanup. Removed some unused things. Started splitting header into
26
27
#ifdef  __cplusplus
28
extern "C" {
29
#endif
30
31
typedef unsigned int DRIZZLE_FIELD_OFFSET; /* offset to current field */
32
390.1.6 by Monty Taylor
Oh dear god the changes. The changes. I'd tell you what they are, but I'd just be making stuff up. Suffice it to day it's mostly all around splitting files in libdrizzle into different files and removing interdepends. And whatever else I happened to see...
33
383.1.45 by Monty Taylor
libdrizzle.h cleanup. Removed some unused things. Started splitting header into
34
typedef struct st_drizzle_field {
35
  char *name;                 /* Name of column */
36
  char *org_name;             /* Original column name, if an alias */
37
  char *table;                /* Table of column if column was a field */
38
  char *org_table;            /* Org table name, if table was an alias */
39
  char *db;                   /* Database for table */
40
  char *catalog;        /* Catalog for table */
840.1.21 by Monty Taylor
ZOMG. Renamed all the rest of the stuff in libdrizzleclient to be drizzleclient_*. I love commandline perl.
41
  char *def;                  /* Default value (set by drizzleclient_list_fields) */
383.1.45 by Monty Taylor
libdrizzle.h cleanup. Removed some unused things. Started splitting header into
42
  uint32_t length;       /* Width of column (create length) */
43
  uint32_t max_length;   /* Max width for selected set */
44
  unsigned int name_length;
45
  unsigned int org_name_length;
46
  unsigned int table_length;
47
  unsigned int org_table_length;
48
  unsigned int db_length;
49
  unsigned int catalog_length;
50
  unsigned int def_length;
51
  unsigned int flags;         /* Div flags */
52
  unsigned int decimals;      /* Number of decimals in field */
53
  unsigned int charsetnr;     /* Character set */
54
  enum enum_field_types type; /* Type of field. See drizzle_com.h for types */
55
  void *extension;
56
} DRIZZLE_FIELD;
57
58
#ifdef  __cplusplus
59
}
60
#endif
61
779.3.37 by Monty Taylor
Renmaed libdrizzle in the tree to libdrizzleclient to avoid namespace clashes
62
#endif /* LIBDRIZZLECLIENT_DRIZZLE_FIELD_H */