[−][src]Enum odbc_api::DataType
Enumeration over valid SQL Data Types supported by ODBC
Variants
The type is not known.
Char(n)
. Character string of fixed length.
Fields of Char
length: ULen
Column size in characters (excluding terminating zero).
`Numeric(p,s). Signed, exact, numeric value with a precision p and scale s (1 <= p <= 15; s <= p)
Decimal(p,s)
. Signed, exact, numeric value with a precision of at least p and scale s. The
maximum precision is driver-defined. (1 <= p <= 15; s <= p)
Integer
. 32 Bit Integer
Smallint
. 16 Bit Integer
Float(p)
. Signed, approximate, numeric value with a binary precision of at least p. The
maximum precision is driver-defined.
Real
. Signed, approximate, numeric value with a binary precision 24 (zero or absolute
value 10[-38] to 10[38]).
Double Precision
. Signed, approximate, numeric value with a binary precision 53 (zero or
absolute value 10[-308] to 10[308]).
Varchar(n)
. Variable length character string.
Fields of Varchar
length: ULen
Maximum length of the character string (excluding terminating zero).
Date
. Year, month, and day fields, conforming to the rules of the Gregorian calendar.
Time
. Hour, minute, and second fields, with valid values for hours of 00 to 23, valid
values for minutes of 00 to 59, and valid values for seconds of 00 to 61. Precision p
indicates the seconds precision.
Fields of Time
precision: SmallInt
Timestamp
. Year, month, day, hour, minute, and second fields, with valid values as defined
for the Date and Time variants.
Fields of Timestamp
precision: SmallInt
The driver returned a type, but it is not among the other types of these enumeration. This is a catchall, in case the library is incomplete, or the data source supports custom or non-standard types.
Fields of Other
data_type: SqlDataType
Type of the column
column_size: ULen
Size of column element
decimal_digits: SmallInt
Implementations
impl DataType
[src]
pub fn new(
data_type: SqlDataType,
column_size: ULen,
decimal_digits: SmallInt
) -> Self
[src]
data_type: SqlDataType,
column_size: ULen,
decimal_digits: SmallInt
) -> Self
Trait Implementations
impl Clone for DataType
[src]
impl Copy for DataType
[src]
impl Debug for DataType
[src]
impl Default for DataType
[src]
impl Eq for DataType
[src]
impl PartialEq<DataType> for DataType
[src]
impl StructuralEq for DataType
[src]
impl StructuralPartialEq for DataType
[src]
Auto Trait Implementations
impl RefUnwindSafe for DataType
impl Send for DataType
impl Sync for DataType
impl Unpin for DataType
impl UnwindSafe for DataType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,