1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems, Inc.
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.
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.
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
21
#ifndef _libdrizzle_drizzle_field_h
22
#define _libdrizzle_drizzle_field_h
30
typedef unsigned int DRIZZLE_FIELD_OFFSET; /* offset to current field */
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 */
60
#endif /* _libdrizzle_drizzle_field_h */