pub enum DataType {
Char(SQLULEN),
Numeric(SQLULEN, SQLSMALLINT),
Decimal(SQLULEN, SQLSMALLINT),
Integer,
SmallInt,
Float,
Real,
Double,
Varchar(SQLULEN),
}Expand description
Describes a column or parameter type.
Variants§
Char(SQLULEN)
Fixed sized single byte character data
Numeric(SQLULEN, SQLSMALLINT)
Exact numerical, with (Precision, Scale)
Decimal(SQLULEN, SQLSMALLINT)
Exact numerical, with (Precision, Scale)
Integer
Integer numerical with precision 10
SmallInt
Small integer numerical with precision 5
Float
Approximate numerical with precision 15
Real
Approximate numerical with precison 7
Double
Approximate numerical with precision 15
Varchar(SQLULEN)
Variadic sized single byte character data
Implementations§
Source§impl DataType
Determines the type stored at the data source
impl DataType
Determines the type stored at the data source
See [Data Types][1] [1]: https://docs.microsoft.com/sql/odbc/reference/appendixes/appendix-d-data-types
Sourcepub fn new(
data_type: SqlDataType,
column_size: SQLULEN,
decimal_digits: SQLSMALLINT,
) -> Option<DataType>
pub fn new( data_type: SqlDataType, column_size: SQLULEN, decimal_digits: SQLSMALLINT, ) -> Option<DataType>
Creates a DataType from a triplet. If the data_type does not require the information
column_size or decimal_digits.
Sourcepub fn sql_data_type(&self) -> SqlDataType
pub fn sql_data_type(&self) -> SqlDataType
See [SQL Data Types][1] [1]: https://docs.microsoft.com/sql/odbc/reference/appendixes/sql-data-types
Sourcepub fn column_size(&self) -> SQLULEN
pub fn column_size(&self) -> SQLULEN
See [Column Size][1] [1]: https://docs.microsoft.com/sql/odbc/reference/appendixes/column-size
Sourcepub fn decimal_digits(&self) -> SQLSMALLINT
pub fn decimal_digits(&self) -> SQLSMALLINT
See [Decimal Digits][1] [1]: https://docs.microsoft.com/sql/odbc/reference/appendixes/decimal-digits