~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/drizzle_field.h

  • Committer: Monty Taylor
  • Date: 2008-09-15 00:46:33 UTC
  • mfrom: (383.1.55 client-split)
  • Revision ID: monty@inaugust.com-20080915004633-fmjw27fi41cxs35w
Merged from client-split.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 */
 
20
 
 
21
#ifndef _libdrizzle_drizzle_field_h
 
22
#define _libdrizzle_drizzle_field_h
 
23
 
 
24
#ifdef  __cplusplus
 
25
extern "C" {
 
26
#endif
 
27
 
 
28
#include <stdint.h>
 
29
 
 
30
typedef unsigned int DRIZZLE_FIELD_OFFSET; /* offset to current field */
 
31
 
 
32
typedef struct st_drizzle_field {
 
33
  char *name;                 /* Name of column */
 
34
  char *org_name;             /* Original column name, if an alias */
 
35
  char *table;                /* Table of column if column was a field */
 
36
  char *org_table;            /* Org table name, if table was an alias */
 
37
  char *db;                   /* Database for table */
 
38
  char *catalog;        /* Catalog for table */
 
39
  char *def;                  /* Default value (set by drizzle_list_fields) */
 
40
  uint32_t length;       /* Width of column (create length) */
 
41
  uint32_t max_length;   /* Max width for selected set */
 
42
  unsigned int name_length;
 
43
  unsigned int org_name_length;
 
44
  unsigned int table_length;
 
45
  unsigned int org_table_length;
 
46
  unsigned int db_length;
 
47
  unsigned int catalog_length;
 
48
  unsigned int def_length;
 
49
  unsigned int flags;         /* Div flags */
 
50
  unsigned int decimals;      /* Number of decimals in field */
 
51
  unsigned int charsetnr;     /* Character set */
 
52
  enum enum_field_types type; /* Type of field. See drizzle_com.h for types */
 
53
  void *extension;
 
54
} DRIZZLE_FIELD;
 
55
 
 
56
#ifdef  __cplusplus
 
57
}
 
58
#endif
 
59
 
 
60
#endif /* _libdrizzle_drizzle_field_h */