1 | /* Copyright (c) 2014, 2024, Oracle and/or its affiliates. |
2 | |
3 | This program is free software; you can redistribute it and/or modify |
4 | it under the terms of the GNU General Public License, version 2.0, |
5 | as published by the Free Software Foundation. |
6 | |
7 | This program is designed to work with certain software (including |
8 | but not limited to OpenSSL) that is licensed under separate terms, |
9 | as designated in a particular file or component or in included license |
10 | documentation. The authors of MySQL hereby grant you an additional |
11 | permission to link the program and your derivative works with the |
12 | separately licensed software that they have either included with |
13 | the program or referenced in the documentation. |
14 | |
15 | Without limiting anything contained in the foregoing, this file, |
16 | which is part of C Driver for MySQL (Connector/C), is also subject to the |
17 | Universal FOSS Exception, version 1.0, a copy of which can be found at |
18 | http://oss.oracle.com/licenses/universal-foss-exception. |
19 | |
20 | This program is distributed in the hope that it will be useful, |
21 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
23 | GNU General Public License, version 2.0, for more details. |
24 | |
25 | You should have received a copy of the GNU General Public License |
26 | along with this program; if not, write to the Free Software |
27 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ |
28 | |
29 | /** |
30 | @file field_types.h |
31 | |
32 | @brief This file contains the field type. |
33 | |
34 | |
35 | @note This file can be imported both from C and C++ code, so the |
36 | definitions have to be constructed to support this. |
37 | */ |
38 | |
39 | #ifndef FIELD_TYPES_INCLUDED |
40 | #define FIELD_TYPES_INCLUDED |
41 | |
42 | #ifdef __cplusplus |
43 | extern "C" { |
44 | #endif /* __cplusplus */ |
45 | |
46 | /* |
47 | * Constants exported from this package. |
48 | */ |
49 | |
50 | /** |
51 | Column types for MySQL |
52 | */ |
53 | enum enum_field_types { |
54 | MYSQL_TYPE_DECIMAL, |
55 | MYSQL_TYPE_TINY, |
56 | MYSQL_TYPE_SHORT, |
57 | MYSQL_TYPE_LONG, |
58 | MYSQL_TYPE_FLOAT, |
59 | MYSQL_TYPE_DOUBLE, |
60 | MYSQL_TYPE_NULL, |
61 | MYSQL_TYPE_TIMESTAMP, |
62 | MYSQL_TYPE_LONGLONG, |
63 | MYSQL_TYPE_INT24, |
64 | MYSQL_TYPE_DATE, |
65 | MYSQL_TYPE_TIME, |
66 | MYSQL_TYPE_DATETIME, |
67 | MYSQL_TYPE_YEAR, |
68 | MYSQL_TYPE_NEWDATE, /**< Internal to MySQL. Not used in protocol */ |
69 | MYSQL_TYPE_VARCHAR, |
70 | MYSQL_TYPE_BIT, |
71 | MYSQL_TYPE_TIMESTAMP2, |
72 | MYSQL_TYPE_DATETIME2, /**< Internal to MySQL. Not used in protocol */ |
73 | MYSQL_TYPE_TIME2, /**< Internal to MySQL. Not used in protocol */ |
74 | MYSQL_TYPE_TYPED_ARRAY, /**< Used for replication only */ |
75 | MYSQL_TYPE_INVALID = 243, |
76 | MYSQL_TYPE_BOOL = 244, /**< Currently just a placeholder */ |
77 | MYSQL_TYPE_JSON = 245, |
78 | MYSQL_TYPE_NEWDECIMAL = 246, |
79 | MYSQL_TYPE_ENUM = 247, |
80 | MYSQL_TYPE_SET = 248, |
81 | MYSQL_TYPE_TINY_BLOB = 249, |
82 | MYSQL_TYPE_MEDIUM_BLOB = 250, |
83 | MYSQL_TYPE_LONG_BLOB = 251, |
84 | MYSQL_TYPE_BLOB = 252, |
85 | MYSQL_TYPE_VAR_STRING = 253, |
86 | MYSQL_TYPE_STRING = 254, |
87 | MYSQL_TYPE_GEOMETRY = 255 |
88 | }; |
89 | |
90 | #ifdef __cplusplus |
91 | } // extern "C" |
92 | #else |
93 | typedef enum enum_field_types enum_field_types; |
94 | #endif /* __cplusplus */ |
95 | |
96 | #endif /* FIELD_TYPES_INCLUDED */ |
97 | |