~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/drizzle_field.h

  • Committer: Jay Pipes
  • Date: 2008-07-17 19:43:08 UTC
  • mto: This revision was merged to the branch mainline in revision 182.
  • Revision ID: jay@mysql.com-20080717194308-l9i4ti57gikm2qbv
Phase 1 removal of DBUG in mysys

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; 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
 
#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>
28
 
#include <libdrizzle/drizzle_com.h>
29
 
 
30
 
typedef unsigned int DRIZZLE_FIELD_OFFSET; /* offset to current field */
31
 
 
32
 
 
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 */