Module diesel::types
[−]
[src]
Types which represent a native SQL data type, and the conversions between them and Rust primitives. The structs in this module are only used as markers to represent a SQL type, and shouldn't be used in your structs. See the documentation for each type to see the Rust types that can be used with a corresponding SQL type. Additional types can be added by other crates.
To see which Rust types can be used with a given SQL type, see the
"Implementors" section of the ToSql
and FromSql
traits, or see the documentation for that SQL type.
Any backend specific types are re-exported through this module
Modules
ops |
Apps should not need to concern themselves with this module. |
Structs
BigInt |
The big integer SQL type. |
Binary |
The binary SQL type. |
Bool |
The boolean SQL type. On SQLite this is emulated with an integer. |
Date |
The date SQL type. |
Double |
The double precision float SQL type. |
Float |
The float SQL type. |
Integer |
The integer SQL type. |
Interval |
The interval SQL type. |
Nullable |
The nullable SQL type. This wraps another SQL type to indicate that it can
be null. By default all values are assumed to be |
Numeric |
The numeric SQL type. |
SmallInt |
The small integer SQL type. |
Text |
The text SQL type. |
Time |
The time SQL type. |
Timestamp |
The timestamp/datetime SQL type. |
Enums
IsNull |
Tiny enum to make the return type of |
Traits
Foldable | |
FromSql |
How to deserialize a single field of a given type. The input will always be the binary representation, not the text. |
FromSqlRow |
How to deserialize multiple fields, with a known type. This type is implemented for tuples of various sizes. |
HasSqlType | |
IntoNullable | |
NotNull | |
SqlOrd | |
ToSql |
Serializes a single value to be sent to the database. The output will be included as a bind parameter, and is expected to be the binary format, not text. |
Type Definitions
VarChar |