odbc_sys/
sql_data_type.rs1#[repr(C)]
2#[derive(Debug, PartialEq, Eq, Clone, Copy)]
3pub struct SqlDataType(pub i16);
4
5impl SqlDataType {
6 pub const UNKNOWN_TYPE: SqlDataType = SqlDataType(0);
7 pub const CHAR: SqlDataType = SqlDataType(1);
9 pub const NUMERIC: SqlDataType = SqlDataType(2);
10 pub const DECIMAL: SqlDataType = SqlDataType(3);
11 pub const INTEGER: SqlDataType = SqlDataType(4);
16 pub const SMALLINT: SqlDataType = SqlDataType(5);
17 pub const FLOAT: SqlDataType = SqlDataType(6);
18 pub const REAL: SqlDataType = SqlDataType(7);
19 pub const DOUBLE: SqlDataType = SqlDataType(8);
22 pub const DATETIME: SqlDataType = SqlDataType(9);
23 pub const VARCHAR: SqlDataType = SqlDataType(12);
24 #[cfg(feature = "odbc_version_4")]
25 pub const UDT: SqlDataType = SqlDataType(17);
26 #[cfg(feature = "odbc_version_4")]
27 pub const ROW: SqlDataType = SqlDataType(19);
28 #[cfg(feature = "odbc_version_4")]
29 pub const ARRAY: SqlDataType = SqlDataType(50);
30 #[cfg(feature = "odbc_version_4")]
31 pub const MULTISET: SqlDataType = SqlDataType(55);
32
33 pub const DATE: SqlDataType = SqlDataType(91);
35 pub const TIME: SqlDataType = SqlDataType(92);
36 pub const TIMESTAMP: SqlDataType = SqlDataType(93);
39 #[cfg(feature = "odbc_version_4")]
40 pub const TIME_WITH_TIMEZONE: SqlDataType = SqlDataType(94);
41 #[cfg(feature = "odbc_version_4")]
42 pub const TIMESTAMP_WITH_TIMEZONE: SqlDataType = SqlDataType(95);
43
44 pub const EXT_TIME_OR_INTERVAL: SqlDataType = SqlDataType(10);
46 pub const EXT_TIMESTAMP: SqlDataType = SqlDataType(11);
47 pub const EXT_LONG_VARCHAR: SqlDataType = SqlDataType(-1);
48 pub const EXT_BINARY: SqlDataType = SqlDataType(-2);
49 pub const EXT_VAR_BINARY: SqlDataType = SqlDataType(-3);
50 pub const EXT_LONG_VAR_BINARY: SqlDataType = SqlDataType(-4);
51 pub const EXT_BIG_INT: SqlDataType = SqlDataType(-5);
52 pub const EXT_TINY_INT: SqlDataType = SqlDataType(-6);
53 pub const EXT_BIT: SqlDataType = SqlDataType(-7);
54 pub const EXT_W_CHAR: SqlDataType = SqlDataType(-8);
55 pub const EXT_W_VARCHAR: SqlDataType = SqlDataType(-9);
56 pub const EXT_W_LONG_VARCHAR: SqlDataType = SqlDataType(-10);
57 pub const EXT_GUID: SqlDataType = SqlDataType(-11);
58}