Enum diesel::mysql::MysqlType[][src]

pub enum MysqlType {
    Tiny,
    Short,
    Long,
    LongLong,
    Float,
    Double,
    Time,
    Date,
    DateTime,
    Timestamp,
    String,
    Blob,
}
Expand description

Represents the possible forms a bind parameter can be transmitted as. Each variant represents one of the forms documented at https://dev.mysql.com/doc/refman/5.7/en/c-api-prepared-statement-type-codes.html

The null variant is omitted, as we will never prepare a statement in which one of the bind parameters can always be NULL

Variants

Tiny

Sets buffer_type to MYSQL_TYPE_TINY

Short

Sets buffer_type to MYSQL_TYPE_SHORT

Long

Sets buffer_type to MYSQL_TYPE_LONG

LongLong

Sets buffer_type to MYSQL_TYPE_LONGLONG

Float

Sets buffer_type to MYSQL_TYPE_FLOAT

Double

Sets buffer_type to MYSQL_TYPE_DOUBLE

Time

Sets buffer_type to MYSQL_TYPE_TIME

Date

Sets buffer_type to MYSQL_TYPE_DATE

DateTime

Sets buffer_type to MYSQL_TYPE_DATETIME

Timestamp

Sets buffer_type to MYSQL_TYPE_TIMESTAMP

String

Sets buffer_type to MYSQL_TYPE_STRING

Blob

Sets buffer_type to MYSQL_TYPE_BLOB

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Convert self to an expression for Diesel’s query builder. Read more

Convert &self to an expression for Diesel’s query builder. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.