1 package org.davidmoten.rx.jdbc; 2 3 public enum Type { 4 5 /** 6 * <P> 7 * The constant in the Java programming language, sometimes referred to as a 8 * type code, that identifies the generic SQL type <code>BIT</code>. 9 */ 10 BIT(-7), 11 12 /** 13 * <P> 14 * The constant in the Java programming language, sometimes referred to as a 15 * type code, that identifies the generic SQL type <code>TINYINT</code>. 16 */ 17 TINYINT(-6), 18 19 /** 20 * <P> 21 * The constant in the Java programming language, sometimes referred to as a 22 * type code, that identifies the generic SQL type <code>SMALLINT</code>. 23 */ 24 SMALLINT(5), 25 26 /** 27 * <P> 28 * The constant in the Java programming language, sometimes referred to as a 29 * type code, that identifies the generic SQL type <code>INTEGER</code>. 30 */ 31 INTEGER(4), 32 33 /** 34 * <P> 35 * The constant in the Java programming language, sometimes referred to as a 36 * type code, that identifies the generic SQL type <code>BIGINT</code>. 37 */ 38 BIGINT(-5), 39 40 /** 41 * <P> 42 * The constant in the Java programming language, sometimes referred to as a 43 * type code, that identifies the generic SQL type <code>FLOAT</code>. 44 */ 45 FLOAT(6), 46 47 /** 48 * <P> 49 * The constant in the Java programming language, sometimes referred to as a 50 * type code, that identifies the generic SQL type <code>REAL</code>. 51 */ 52 REAL(7), 53 54 /** 55 * <P> 56 * The constant in the Java programming language, sometimes referred to as a 57 * type code, that identifies the generic SQL type <code>DOUBLE</code>. 58 */ 59 DOUBLE(8), 60 61 /** 62 * <P> 63 * The constant in the Java programming language, sometimes referred to as a 64 * type code, that identifies the generic SQL type <code>NUMERIC</code>. 65 */ 66 NUMERIC(2), 67 68 /** 69 * <P> 70 * The constant in the Java programming language, sometimes referred to as a 71 * type code, that identifies the generic SQL type <code>DECIMAL</code>. 72 */ 73 DECIMAL(3), 74 75 /** 76 * <P> 77 * The constant in the Java programming language, sometimes referred to as a 78 * type code, that identifies the generic SQL type <code>CHAR</code>. 79 */ 80 CHAR(1), 81 82 /** 83 * <P> 84 * The constant in the Java programming language, sometimes referred to as a 85 * type code, that identifies the generic SQL type <code>VARCHAR</code>. 86 */ 87 VARCHAR(12), 88 89 /** 90 * <P> 91 * The constant in the Java programming language, sometimes referred to as a 92 * type code, that identifies the generic SQL type <code>LONGVARCHAR</code>. 93 */ 94 LONGVARCHAR(-1), 95 96 /** 97 * <P> 98 * The constant in the Java programming language, sometimes referred to as a 99 * type code, that identifies the generic SQL type <code>DATE</code>. 100 */ 101 DATE(91), 102 103 /** 104 * <P> 105 * The constant in the Java programming language, sometimes referred to as a 106 * type code, that identifies the generic SQL type <code>TIME</code>. 107 */ 108 TIME(92), 109 110 /** 111 * <P> 112 * The constant in the Java programming language, sometimes referred to as a 113 * type code, that identifies the generic SQL type <code>TIMESTAMP</code>. 114 */ 115 TIMESTAMP(93), 116 117 /** 118 * <P> 119 * The constant in the Java programming language, sometimes referred to as a 120 * type code, that identifies the generic SQL type <code>BINARY</code>. 121 */ 122 BINARY(-2), 123 124 /** 125 * <P> 126 * The constant in the Java programming language, sometimes referred to as a 127 * type code, that identifies the generic SQL type <code>VARBINARY</code>. 128 */ 129 VARBINARY(-3), 130 131 /** 132 * <P> 133 * The constant in the Java programming language, sometimes referred to as a 134 * type code, that identifies the generic SQL type <code>LONGVARBINARY</code>. 135 */ 136 LONGVARBINARY(-4), 137 138 /** 139 * <P> 140 * The constant in the Java programming language that identifies the generic SQL 141 * value <code>NULL</code>. 142 */ 143 NULL(0), 144 145 /** 146 * The constant in the Java programming language that indicates that the SQL 147 * type is database-specific and gets mapped to a Java object that can be 148 * accessed via the methods <code>getObject</code> and <code>setObject</code>. 149 */ 150 OTHER(1111), 151 152 /** 153 * The constant in the Java programming language, sometimes referred to as a 154 * type code, that identifies the generic SQL type <code>JAVA_OBJECT</code>. 155 * 156 * @since 1.2 157 */ 158 JAVA_OBJECT(2000), 159 160 /** 161 * The constant in the Java programming language, sometimes referred to as a 162 * type code, that identifies the generic SQL type <code>DISTINCT</code>. 163 * 164 * @since 1.2 165 */ 166 DISTINCT(2001), 167 168 /** 169 * The constant in the Java programming language, sometimes referred to as a 170 * type code, that identifies the generic SQL type <code>STRUCT</code>. 171 * 172 * @since 1.2 173 */ 174 STRUCT(2002), 175 176 /** 177 * The constant in the Java programming language, sometimes referred to as a 178 * type code, that identifies the generic SQL type <code>ARRAY</code>. 179 * 180 * @since 1.2 181 */ 182 ARRAY(2003), 183 184 /** 185 * The constant in the Java programming language, sometimes referred to as a 186 * type code, that identifies the generic SQL type <code>BLOB</code>. 187 * 188 * @since 1.2 189 */ 190 BLOB(2004), 191 192 /** 193 * The constant in the Java programming language, sometimes referred to as a 194 * type code, that identifies the generic SQL type <code>CLOB</code>. 195 * 196 * @since 1.2 197 */ 198 CLOB(2005), 199 200 /** 201 * The constant in the Java programming language, sometimes referred to as a 202 * type code, that identifies the generic SQL type <code>REF</code>. 203 * 204 * @since 1.2 205 */ 206 REF(2006), 207 208 /** 209 * The constant in the Java programming language, somtimes referred to as a type 210 * code, that identifies the generic SQL type <code>DATALINK</code>. 211 * 212 * @since 1.4 213 */ 214 DATALINK(70), 215 216 /** 217 * The constant in the Java programming language, somtimes referred to as a type 218 * code, that identifies the generic SQL type <code>BOOLEAN</code>. 219 * 220 * @since 1.4 221 */ 222 BOOLEAN(16), 223 224 // ------------------------- JDBC 4.0 ----------------------------------- 225 226 /** 227 * The constant in the Java programming language, sometimes referred to as a 228 * type code, that identifies the generic SQL type <code>ROWID</code> 229 * 230 * @since 1.6 231 * 232 */ 233 ROWID(-8), 234 235 /** 236 * The constant in the Java programming language, sometimes referred to as a 237 * type code, that identifies the generic SQL type <code>NCHAR</code> 238 * 239 * @since 1.6 240 */ 241 NCHAR(-15), 242 243 /** 244 * The constant in the Java programming language, sometimes referred to as a 245 * type code, that identifies the generic SQL type <code>NVARCHAR</code>. 246 * 247 * @since 1.6 248 */ 249 NVARCHAR(-9), 250 251 /** 252 * The constant in the Java programming language, sometimes referred to as a 253 * type code, that identifies the generic SQL type <code>LONGNVARCHAR</code>. 254 * 255 * @since 1.6 256 */ 257 LONGNVARCHAR(-16), 258 259 /** 260 * The constant in the Java programming language, sometimes referred to as a 261 * type code, that identifies the generic SQL type <code>NCLOB</code>. 262 * 263 * @since 1.6 264 */ 265 NCLOB(2011), 266 267 /** 268 * The constant in the Java programming language, sometimes referred to as a 269 * type code, that identifies the generic SQL type <code>XML</code>. 270 * 271 * @since 1.6 272 */ 273 SQLXML(2009), 274 275 // --------------------------JDBC 4.2 ----------------------------- 276 277 /** 278 * The constant in the Java programming language, sometimes referred to as a 279 * type code, that identifies the generic SQL type {@code REF CURSOR}. 280 * 281 * @since 1.8 282 */ 283 REF_CURSOR(2012), 284 285 /** 286 * The constant in the Java programming language, sometimes referred to as a 287 * type code, that identifies the generic SQL type {@code TIME WITH TIMEZONE}. 288 * 289 * @since 1.8 290 */ 291 TIME_WITH_TIMEZONE(2013), 292 293 /** 294 * The constant in the Java programming language, sometimes referred to as a 295 * type code, that identifies the generic SQL type 296 * {@code TIMESTAMP WITH TIMEZONE}. 297 * 298 * @since 1.8 299 */ 300 TIMESTAMP_WITH_TIMEZONE(2014); 301 302 private final int value; 303 304 Type(int value) { 305 this.value = value; 306 } 307 308 public int value() { 309 return value; 310 } 311 }