Enum odbc_safe::DataType [−][src]
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 numerical with precision 10
Small integer numerical with precision 5
Approximate numerical with precision 15
Approximate numerical with precison 7
Approximate numerical with precision 15
Varchar(SQLULEN)
Variadic sized single byte character data
Implementations
impl DataType
[src]
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
pub fn new(
data_type: SqlDataType,
column_size: SQLULEN,
decimal_digits: SQLSMALLINT
) -> Option<DataType>
[src]
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
.
pub fn sql_data_type(&self) -> SqlDataType
[src]
See [SQL Data Types][1] [1]: https://docs.microsoft.com/sql/odbc/reference/appendixes/sql-data-types
pub fn column_size(&self) -> SQLULEN
[src]
See [Column Size][1] [1]: https://docs.microsoft.com/sql/odbc/reference/appendixes/column-size
pub fn decimal_digits(&self) -> SQLSMALLINT
[src]
See [Decimal Digits][1] [1]: https://docs.microsoft.com/sql/odbc/reference/appendixes/decimal-digits
Trait Implementations
impl Clone for DataType
[src]
impl Copy for DataType
[src]
impl Debug 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
[src]
impl Send for DataType
[src]
impl Sync for DataType
[src]
impl Unpin for DataType
[src]
impl UnwindSafe for DataType
[src]
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,