**** Merged from MCS ****
[mono-project.git] / mcs / class / ByteFX.Data / mysqlclient / MysqlDefs.cs
blob9eeaac8cd7d40be3cd5a20fccdd5236956658213
1 // ByteFX.Data data access components for .Net
2 // Copyright (C) 2002-2003 ByteFX, Inc.
3 //
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 //
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 using System;
19 namespace ByteFX.Data.MySqlClient
21 /// <summary>
22 /// Summary description for ClientParam.
23 /// </summary>
24 [Flags()]
25 internal enum ClientParam
27 CLIENT_LONG_PASSWORD = 1, // new more secure passwords
28 CLIENT_FOUND_ROWS = 2, // found instead of affected rows
29 CLIENT_LONG_FLAG = 4, // Get all column flags
30 CLIENT_CONNECT_WITH_DB = 8, // One can specify db on connect
31 CLIENT_NO_SCHEMA = 16, // Don't allow db.table.column
32 CLIENT_COMPRESS = 32, // Client can use compression protocol
33 CLIENT_ODBC = 64, // ODBC client
34 CLIENT_LOCAL_FILES = 128, // Can use LOAD DATA LOCAL
35 CLIENT_IGNORE_SPACE = 256, // Ignore spaces before '('
36 CLIENT_CHANGE_USER = 512, // Support the mysql_change_user()
37 CLIENT_INTERACTIVE = 1024, // This is an interactive client
38 CLIENT_SSL = 2048, // Switch to SSL after handshake
39 CLIENT_IGNORE_SIGPIPE = 4096, // IGNORE sigpipes
40 CLIENT_TRANSACTIONS = 8192, // Client knows about transactions
41 CLIENT_PROTOCOL_41 = 16384,
42 CLIENT_SECURE_CONNECTION = 32768
47 /// <summary>
48 /// DB Operations Code
49 /// </summary>
50 internal enum DBCmd : byte
52 SLEEP = 0,
53 QUIT = 1,
54 INIT_DB = 2,
55 QUERY = 3,
56 FIELD_LIST = 4,
57 CREATE_DB = 5,
58 DROP_DB = 6,
59 RELOAD = 7,
60 SHUTDOWN = 8,
61 STATISTICS = 9,
62 PROCESS_INFO = 10,
63 CONNECT = 11,
64 PROCESS_KILL = 12,
65 DEBUG = 13,
66 PING = 14,
67 TIME = 15,
68 DELAYED_INSERT = 16,
69 CHANGE_USER = 17,
72 /// <summary>
73 /// Specifies MySQL specific data type of a field, property, for use in a <see cref="MySqlParameter"/>.
74 /// </summary>
75 public enum MySqlDbType
77 /// <summary> <see cref="Decimal"/><para>A fixed precision and scale numeric value between -1038 -1 and 10 38 -1.</para></summary>
78 Decimal = 0,
79 /// <summary> <see cref="Byte"/><para>The signed range is -128 to 127. The unsigned range is 0 to 255.</para></summary>
80 Byte = 1,
81 /// <summary><see cref="Int16"/><para>A 16-bit signed or unsigned integer. The signed range is -32768 to 32767. The unsigned range is 0 to 65535</para></summary>
82 Short = 2,
83 /// <summary><see cref="Int32"/><para>A 32-bit signed or unsigned integer</para></summary>
84 Int = 3,
85 /// <summary><b>Obsolete</b> Please use Int for 32 bit values</summary>
86 [Obsolete("Long is no longer the correct way of specifying a 32 bit value. Use Int")]
87 Long = 3,
88 /// <summary><see cref="Single"/><para>A small (single-precision) floating-point number. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38.</para></summary>
89 Float = 4,
90 /// <summary><see cref="Double"/><para>A normal-size (double-precision) floating-point number. Allowable values are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308.</para></summary>
91 Double = 5,
92 /// <summary>Specifies a null value</summary>
93 Null = 6,
94 /// <summary>A timestamp. The range is '1970-01-01 00:00:00' to sometime in the year 2037</summary>
95 Timestamp = 7,
96 /// <summary><see cref="Int64"/><para>A 64-bit signed or unsigned integer.</para></summary>
97 BigInt = 8,
98 /// <summary><b>Obsolete</b> Please use BigInt for 64 bit values</summary>
99 [Obsolete("LongLong is no longer the correct way of specifying a 64 bit value. Use BigInt")]
100 LongLong = 8,
101 /// <summary>Specifies a 24 (3 byte) signed or unsigned value.</summary>
102 Int24 = 9,
103 ///<summary>Date The supported range is '1000-01-01' to '9999-12-31'.</summary>
104 Date = 10,
105 /// <summary> Time <para>The range is '-838:59:59' to '838:59:59'.</para></summary>
106 Time = 11,
107 ///<summary>DateTime The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.</summary>
108 Datetime = 12,
109 /// <summary>A year in 2- or 4-digit format (default is 4-digit). The allowable values are 1901 to 2155, 0000 in the 4-digit year format, and 1970-2069 if you use the 2-digit format (70-69)</summary>
110 Year = 13,
111 /// <summary><b>Obsolete</b> Use Datetime or Date type</summary>
112 Newdate = 14,
113 /// <summary>An enumeration. A string object that can have only one value, chosen from the list of values 'value1', 'value2', ..., NULL or the special "" error value. An ENUM can have a maximum of 65535 distinct values</summary>
114 Enum = 247,
115 /// <summary>A set. A string object that can have zero or more values, each of which must be chosen from the list of values 'value1', 'value2', ... A SET can have a maximum of 64 members.</summary>
116 Set = 248,
117 /// <summary>A BLOB or TEXT column with a maximum length of 255 (2^8 - 1) characters</summary>
118 TinyBlob = 249,
119 /// <summary>A BLOB or TEXT column with a maximum length of 16777215 (2^24 - 1) characters</summary>
120 MediumBlob = 250,
121 /// <summary>A BLOB or TEXT column with a maximum length of 4294967295 or 4G (2^32 - 1) characters</summary>
122 LongBlob = 251,
123 /// <summary>A BLOB or TEXT column with a maximum length of 65535 (2^16 - 1) characters</summary>
124 Blob = 252,
125 /// <summary>A variable-length string containing 0 to 255 characters</summary>
126 VarChar = 253,
127 /// <summary><b>Obsolete</b> Use VarChar type</summary>
128 String = 254
132 enum Field_Type : byte
134 DECIMAL =0,
135 BYTE =1,
136 SHORT =2,
137 LONG =3,
138 FLOAT =4,
139 DOUBLE =5,
140 NULL =6,
141 TIMESTAMP =7,
142 LONGLONG =8,
143 INT24 =9,
144 DATE =10,
145 TIME =11,
146 DATETIME =12,
147 YEAR =13,
148 NEWDATE =14,
149 ENUM =247,
150 SET =248,
151 TINY_BLOB =249,
152 MEDIUM_BLOB =250,
153 LONG_BLOB =251,
154 BLOB =252,
155 VAR_STRING =253,
156 STRING =254,