pub enum SqlValue {
}Expand description
A SQL value that can represent any SQL Server data type.
This enum provides a type-safe way to handle SQL values that may be of various types, including NULL.
Variants§
Null
NULL value.
Bool(bool)
Boolean value (BIT).
TinyInt(u8)
8-bit unsigned integer (TINYINT).
SmallInt(i16)
16-bit signed integer (SMALLINT).
Int(i32)
32-bit signed integer (INT).
BigInt(i64)
64-bit signed integer (BIGINT).
Float(f32)
32-bit floating point (REAL).
Double(f64)
64-bit floating point (FLOAT).
String(String)
String value (CHAR, VARCHAR, NCHAR, NVARCHAR, TEXT, NTEXT).
Binary(Bytes)
Binary value (BINARY, VARBINARY, IMAGE).
Decimal(Decimal)
Decimal value (DECIMAL, NUMERIC, MONEY, SMALLMONEY).
Uuid(Uuid)
UUID value (UNIQUEIDENTIFIER).
Date(NaiveDate)
Date value (DATE).
Time(NaiveTime)
Time value (TIME).
DateTime(NaiveDateTime)
DateTime value (DATETIME, DATETIME2, SMALLDATETIME).
DateTimeOffset(DateTime<FixedOffset>)
DateTimeOffset value (DATETIMEOFFSET).
Xml(String)
XML value (XML type).
Implementations§
Trait Implementations§
Source§impl From<NaiveDateTime> for SqlValue
Available on crate feature chrono only.
impl From<NaiveDateTime> for SqlValue
Available on crate feature
chrono only.Source§fn from(v: NaiveDateTime) -> SqlValue
fn from(v: NaiveDateTime) -> SqlValue
Converts to this type from the input type.
impl StructuralPartialEq for SqlValue
Auto Trait Implementations§
impl !Freeze for SqlValue
impl RefUnwindSafe for SqlValue
impl Send for SqlValue
impl Sync for SqlValue
impl Unpin for SqlValue
impl UnwindSafe for SqlValue
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)