~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
20
#ifndef _libdrizzle_drizzle_field_h
21
#define _libdrizzle_drizzle_field_h
22
23
#ifdef  __cplusplus
24
extern "C" {
25
#endif
26
27
#include <stdint.h>
543 by Monty Taylor
Renamed drizzle_common again. Removed sql_common. (empty)
28
#include <drizzled/common.h>
383.1.45 by Monty Taylor
libdrizzle.h cleanup. Removed some unused things. Started splitting header into
29
30
typedef unsigned int DRIZZLE_FIELD_OFFSET; /* offset to current field */
31
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...
32
383.1.45 by Monty Taylor
libdrizzle.h cleanup. Removed some unused things. Started splitting header into
33
typedef struct st_drizzle_field {
34
  char *name;                 /* Name of column */
35
  char *org_name;             /* Original column name, if an alias */
36
  char *table;                /* Table of column if column was a field */
37
  char *org_table;            /* Org table name, if table was an alias */
38
  char *db;                   /* Database for table */
39
  char *catalog;        /* Catalog for table */
40
  char *def;                  /* Default value (set by drizzle_list_fields) */
41
  uint32_t length;       /* Width of column (create length) */
42
  uint32_t max_length;   /* Max width for selected set */
43
  unsigned int name_length;
44
  unsigned int org_name_length;
45
  unsigned int table_length;
46
  unsigned int org_table_length;
47
  unsigned int db_length;
48
  unsigned int catalog_length;
49
  unsigned int def_length;
50
  unsigned int flags;         /* Div flags */
51
  unsigned int decimals;      /* Number of decimals in field */
52
  unsigned int charsetnr;     /* Character set */
53
  enum enum_field_types type; /* Type of field. See drizzle_com.h for types */
54
  void *extension;
55
} DRIZZLE_FIELD;
56
57
#ifdef  __cplusplus
58
}
59
#endif
60
61
#endif /* _libdrizzle_drizzle_field_h */