1455.3.1
by Vladimir Kolesnikov
lp:drizzle + pbxt 1.1 + test results |
1 |
/* Copyright (c) 2008 PrimeBase Technologies GmbH, Germany
|
2 |
*
|
|
3 |
* PrimeBase XT
|
|
4 |
*
|
|
5 |
* This program is free software; you can redistribute it and/or modify
|
|
6 |
* it under the terms of the GNU General Public License as published by
|
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
8 |
* (at your option) any later version.
|
|
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
18 |
*
|
|
19 |
* Created by Leslie on 8/27/08.
|
|
20 |
*
|
|
21 |
*/
|
|
22 |
||
23 |
#ifndef __DISCOVER_XT_H__
|
|
24 |
#define __DISCOVER_XT_H__
|
|
25 |
||
26 |
#ifdef DRIZZLED
|
|
27 |
#include <drizzled/common.h> |
|
28 |
using namespace drizzled; |
|
29 |
#else
|
|
30 |
#include "mysql_priv.h" |
|
31 |
#endif
|
|
32 |
||
33 |
/*
|
|
34 |
* ---------------------------------------------------------------
|
|
35 |
* TABLE DISCOVERY HANDLER
|
|
36 |
*/
|
|
37 |
||
38 |
typedef struct dt_field_info { |
|
39 |
/**
|
|
40 |
This is used as column name.
|
|
41 |
*/
|
|
42 |
const char* field_name; |
|
43 |
/**
|
|
44 |
For string-type columns, this is the maximum number of
|
|
45 |
characters. For numeric data this can be NULL.
|
|
46 |
*/
|
|
47 |
uint field_length; |
|
48 |
||
49 |
/**
|
|
50 |
For decimal columns, this is the maximum number of
|
|
51 |
digits after the decimal. For other data this can be NULL.
|
|
52 |
*/
|
|
53 |
char* field_decimal_length; |
|
54 |
/**
|
|
55 |
This denotes data type for the column. For the most part, there seems to
|
|
56 |
be one entry in the enum for each SQL data type, although there seem to
|
|
57 |
be a number of additional entries in the enum.
|
|
58 |
*/
|
|
59 |
enum enum_field_types field_type; |
|
60 |
||
61 |
/**
|
|
62 |
This is the charater set for non numeric data types including blob data.
|
|
63 |
*/
|
|
64 |
CHARSET_INFO *field_charset; |
|
65 |
||
66 |
uint field_flags; // Field atributes(maybe_null, signed, unsigned etc.) |
|
67 |
const char* comment; |
|
68 |
} DT_FIELD_INFO; |
|
69 |
||
70 |
typedef struct dt_key_info |
|
71 |
{
|
|
72 |
const char* key_name; |
|
73 |
uint key_type; /* PRI_KEY_FLAG, UNIQUE_KEY_FLAG, MULTIPLE_KEY_FLAG */ |
|
74 |
const char* key_columns[8]; // The size of this can be set to what ever you need. |
|
75 |
} DT_KEY_INFO; |
|
76 |
||
77 |
int xt_create_table_frm(handlerton *hton, THD* thd, const char *db, const char *name, DT_FIELD_INFO *info, DT_KEY_INFO *keys, xtBool skip_existing); |
|
78 |
||
79 |
#endif
|
|
80 |