pub enum DataType {
}Expand description
SQL data types (PostgreSQL compatible)
Represents the type of a column or value in the database. These types are designed to be compatible with PostgreSQL for wire protocol support.
§Type Aliases
Common PostgreSQL type aliases are supported:
SERIAL→ Int4 with auto-incrementBIGSERIAL→ Int8 with auto-incrementINTEGER→ Int4BIGINT→ Int8REAL→ Float4DOUBLE PRECISION→ Float8
Variants§
Boolean
Boolean type (true/false)
Int2
16-bit signed integer (-32768 to 32767)
Int4
32-bit signed integer (-2^31 to 2^31-1)
Int8
64-bit signed integer (-2^63 to 2^63-1)
Float4
32-bit IEEE 754 floating point
Float8
64-bit IEEE 754 floating point
Numeric
Arbitrary precision numeric (stored as string)
Varchar(Option<usize>)
Variable-length string with optional max length
Text
Unlimited-length string
Char(usize)
Fixed-length string (padded with spaces)
Bytea
Binary data (byte array)
Date
Calendar date (year, month, day)
Time
Time of day without timezone
Timestamp
Date and time without timezone
Timestamptz
Date and time with timezone (stored as UTC)
Interval
Time interval (duration)
Uuid
Universally unique identifier (128-bit)
Json
JSON text (stored as string)
Jsonb
Binary JSON (optimized for queries)
Array(Box<DataType>)
Array of values of the inner type
Vector(usize)
Fixed-dimension vector for ML embeddings
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DataType
impl<'de> Deserialize<'de> for DataType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for DataType
impl StructuralPartialEq for DataType
Auto Trait Implementations§
impl Freeze for DataType
impl RefUnwindSafe for DataType
impl Send for DataType
impl Sync for DataType
impl Unpin for DataType
impl UnsafeUnpin for DataType
impl UnwindSafe for DataType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.