[][src]Enum odbc_safe::DataType

pub enum DataType {
    Char(SQLULEN),
    Numeric(SQLULENSQLSMALLINT),
    Decimal(SQLULENSQLSMALLINT),
    Integer,
    SmallInt,
    Float,
    Real,
    Double,
    Varchar(SQLULEN),
}

Describes a column or parameter type.

Variants

Char(SQLULEN)

Fixed sized single byte character data

Numeric(SQLULENSQLSMALLINT)

Exact numerical, with (Precision, Scale)

Decimal(SQLULENSQLSMALLINT)

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

Methods

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]

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 Eq for DataType[src]

impl PartialEq<DataType> for DataType[src]

impl Debug for DataType[src]

impl StructuralPartialEq for DataType[src]

impl StructuralEq for DataType[src]

Auto Trait Implementations

impl Send for DataType

impl Sync for DataType

impl Unpin for DataType

impl UnwindSafe for DataType

impl RefUnwindSafe for DataType

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]