pub enum PostgresValue<'a> {
Smallint(i16),
Integer(i32),
Bigint(i64),
Real(f32),
DoublePrecision(f64),
Text(Cow<'a, str>),
Bytea(Cow<'a, [u8]>),
Boolean(bool),
Enum(Box<dyn PostgresEnum>),
Array(Vec<PostgresValue<'a>>),
Null,
}Expand description
Represents a PostgreSQL value
Variants§
Smallint(i16)
SMALLINT values (16-bit signed integer)
Integer(i32)
INTEGER values (32-bit signed integer)
Bigint(i64)
BIGINT values (64-bit signed integer)
Real(f32)
REAL values (32-bit floating point)
DoublePrecision(f64)
DOUBLE PRECISION values (64-bit floating point)
Text(Cow<'a, str>)
TEXT, VARCHAR, CHAR values
Bytea(Cow<'a, [u8]>)
BYTEA values (binary data)
Boolean(bool)
BOOLEAN values
Enum(Box<dyn PostgresEnum>)
Native PostgreSQL ENUM values
Array(Vec<PostgresValue<'a>>)
Array of any PostgreSQL type
Null
NULL value
Trait Implementations§
Source§impl<'a> Clone for PostgresValue<'a>
impl<'a> Clone for PostgresValue<'a>
Source§fn clone(&self) -> PostgresValue<'a>
fn clone(&self) -> PostgresValue<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for PostgresValue<'a>
impl<'a> Debug for PostgresValue<'a>
Source§impl<'a> Default for PostgresValue<'a>
impl<'a> Default for PostgresValue<'a>
Source§impl<'a> Display for PostgresValue<'a>
impl<'a> Display for PostgresValue<'a>
Source§impl<'a> From<&'a [PostgresValue<'a>]> for PostgresValue<'a>
impl<'a> From<&'a [PostgresValue<'a>]> for PostgresValue<'a>
Source§fn from(value: &'a [PostgresValue<'a>]) -> Self
fn from(value: &'a [PostgresValue<'a>]) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a [u8]> for PostgresValue<'a>
impl<'a> From<&'a [u8]> for PostgresValue<'a>
Source§impl<'a> From<&'a PostgresValue<'a>> for Cow<'a, PostgresValue<'a>>
impl<'a> From<&'a PostgresValue<'a>> for Cow<'a, PostgresValue<'a>>
Source§fn from(value: &'a PostgresValue<'a>) -> Self
fn from(value: &'a PostgresValue<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a String> for PostgresValue<'a>
impl<'a> From<&'a String> for PostgresValue<'a>
Source§impl<'a> From<&'a bool> for PostgresValue<'a>
impl<'a> From<&'a bool> for PostgresValue<'a>
Source§impl<'a> From<&'a f32> for PostgresValue<'a>
impl<'a> From<&'a f32> for PostgresValue<'a>
Source§impl<'a> From<&'a f64> for PostgresValue<'a>
impl<'a> From<&'a f64> for PostgresValue<'a>
Source§impl<'a> From<&'a i16> for PostgresValue<'a>
impl<'a> From<&'a i16> for PostgresValue<'a>
Source§impl<'a> From<&'a i32> for PostgresValue<'a>
impl<'a> From<&'a i32> for PostgresValue<'a>
Source§impl<'a> From<&'a i64> for PostgresValue<'a>
impl<'a> From<&'a i64> for PostgresValue<'a>
Source§impl<'a> From<&'a i8> for PostgresValue<'a>
impl<'a> From<&'a i8> for PostgresValue<'a>
Source§impl<'a> From<&'a isize> for PostgresValue<'a>
impl<'a> From<&'a isize> for PostgresValue<'a>
Source§impl<'a> From<&'a str> for PostgresValue<'a>
impl<'a> From<&'a str> for PostgresValue<'a>
Source§impl<'a> From<&'a u16> for PostgresValue<'a>
impl<'a> From<&'a u16> for PostgresValue<'a>
Source§impl<'a> From<&'a u32> for PostgresValue<'a>
impl<'a> From<&'a u32> for PostgresValue<'a>
Source§impl<'a> From<&'a u64> for PostgresValue<'a>
impl<'a> From<&'a u64> for PostgresValue<'a>
Source§impl<'a> From<&'a u8> for PostgresValue<'a>
impl<'a> From<&'a u8> for PostgresValue<'a>
Source§impl<'a> From<&'a usize> for PostgresValue<'a>
impl<'a> From<&'a usize> for PostgresValue<'a>
Source§impl<'a, T> From<Option<T>> for PostgresValue<'a>where
T: TryInto<PostgresValue<'a>>,
impl<'a, T> From<Option<T>> for PostgresValue<'a>where
T: TryInto<PostgresValue<'a>>,
Source§impl<'a> From<OwnedPostgresValue> for PostgresValue<'a>
impl<'a> From<OwnedPostgresValue> for PostgresValue<'a>
Source§fn from(value: OwnedPostgresValue) -> Self
fn from(value: OwnedPostgresValue) -> Self
Converts to this type from the input type.
Source§impl<'a> From<PostgresValue<'a>> for Cow<'a, PostgresValue<'a>>
impl<'a> From<PostgresValue<'a>> for Cow<'a, PostgresValue<'a>>
Source§fn from(value: PostgresValue<'a>) -> Self
fn from(value: PostgresValue<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<PostgresValue<'a>> for OwnedPostgresValue
impl<'a> From<PostgresValue<'a>> for OwnedPostgresValue
Source§fn from(value: PostgresValue<'a>) -> Self
fn from(value: PostgresValue<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<PostgresValue<'a>> for SQL<'a, PostgresValue<'a>>
impl<'a> From<PostgresValue<'a>> for SQL<'a, PostgresValue<'a>>
Source§fn from(value: PostgresValue<'a>) -> Self
fn from(value: PostgresValue<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SQL<'a, PostgresValue<'a>>> for PostgresValue<'a>
impl<'a> From<SQL<'a, PostgresValue<'a>>> for PostgresValue<'a>
Source§fn from(_value: SQL<'a, PostgresValue<'a>>) -> Self
fn from(_value: SQL<'a, PostgresValue<'a>>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<String> for PostgresValue<'a>
impl<'a> From<String> for PostgresValue<'a>
Source§impl<'a> From<Vec<PostgresValue<'a>>> for PostgresValue<'a>
impl<'a> From<Vec<PostgresValue<'a>>> for PostgresValue<'a>
Source§fn from(value: Vec<PostgresValue<'a>>) -> Self
fn from(value: Vec<PostgresValue<'a>>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<bool> for PostgresValue<'a>
impl<'a> From<bool> for PostgresValue<'a>
Source§impl<'a> From<f32> for PostgresValue<'a>
impl<'a> From<f32> for PostgresValue<'a>
Source§impl<'a> From<f64> for PostgresValue<'a>
impl<'a> From<f64> for PostgresValue<'a>
Source§impl<'a> From<i16> for PostgresValue<'a>
impl<'a> From<i16> for PostgresValue<'a>
Source§impl<'a> From<i32> for PostgresValue<'a>
impl<'a> From<i32> for PostgresValue<'a>
Source§impl<'a> From<i64> for PostgresValue<'a>
impl<'a> From<i64> for PostgresValue<'a>
Source§impl<'a> From<i8> for PostgresValue<'a>
impl<'a> From<i8> for PostgresValue<'a>
Source§impl<'a> From<isize> for PostgresValue<'a>
impl<'a> From<isize> for PostgresValue<'a>
Source§impl<'a> From<u16> for PostgresValue<'a>
impl<'a> From<u16> for PostgresValue<'a>
Source§impl<'a> From<u32> for PostgresValue<'a>
impl<'a> From<u32> for PostgresValue<'a>
Source§impl<'a> From<u64> for PostgresValue<'a>
impl<'a> From<u64> for PostgresValue<'a>
Source§impl<'a> From<u8> for PostgresValue<'a>
impl<'a> From<u8> for PostgresValue<'a>
Source§impl<'a> From<usize> for PostgresValue<'a>
impl<'a> From<usize> for PostgresValue<'a>
Source§impl<'a> PartialEq for PostgresValue<'a>
impl<'a> PartialEq for PostgresValue<'a>
Source§impl<'a, Table, Query> ToSQL<'a, PostgresValue<'a>> for CTEView<'a, Table, Query>where
Query: ToSQL<'a, PostgresValue<'a>>,
ToSQL implementation renders just the CTE name for use in FROM clauses.
Unlike aliased tables (which render as “original” AS “alias”), CTEs
should just render as their name since they’re already defined in the WITH clause.
impl<'a, Table, Query> ToSQL<'a, PostgresValue<'a>> for CTEView<'a, Table, Query>where
Query: ToSQL<'a, PostgresValue<'a>>,
ToSQL implementation renders just the CTE name for use in FROM clauses. Unlike aliased tables (which render as “original” AS “alias”), CTEs should just render as their name since they’re already defined in the WITH clause.
Source§impl<'a, Schema, State, Table> ToSQL<'a, PostgresValue<'a>> for QueryBuilder<'a, Schema, State, Table>
impl<'a, Schema, State, Table> ToSQL<'a, PostgresValue<'a>> for QueryBuilder<'a, Schema, State, Table>
Source§impl<'a> TryFrom<PostgresValue<'a>> for String
impl<'a> TryFrom<PostgresValue<'a>> for String
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl<'a> TryFrom<PostgresValue<'a>> for Vec<PostgresValue<'a>>
impl<'a> TryFrom<PostgresValue<'a>> for Vec<PostgresValue<'a>>
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl<'a> TryFrom<PostgresValue<'a>> for Vec<u8>
impl<'a> TryFrom<PostgresValue<'a>> for Vec<u8>
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl<'a> TryFrom<PostgresValue<'a>> for bool
impl<'a> TryFrom<PostgresValue<'a>> for bool
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl<'a> TryFrom<PostgresValue<'a>> for f32
impl<'a> TryFrom<PostgresValue<'a>> for f32
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl<'a> TryFrom<PostgresValue<'a>> for f64
impl<'a> TryFrom<PostgresValue<'a>> for f64
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl<'a> TryFrom<PostgresValue<'a>> for i16
impl<'a> TryFrom<PostgresValue<'a>> for i16
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl<'a> TryFrom<PostgresValue<'a>> for i32
impl<'a> TryFrom<PostgresValue<'a>> for i32
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl<'a> TryFrom<PostgresValue<'a>> for i64
impl<'a> TryFrom<PostgresValue<'a>> for i64
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
impl<'a> SQLParam for PostgresValue<'a>
impl<'a> StructuralPartialEq for PostgresValue<'a>
Auto Trait Implementations§
impl<'a> Freeze for PostgresValue<'a>
impl<'a> !RefUnwindSafe for PostgresValue<'a>
impl<'a> Send for PostgresValue<'a>
impl<'a> Sync for PostgresValue<'a>
impl<'a> Unpin for PostgresValue<'a>
impl<'a> !UnwindSafe for PostgresValue<'a>
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more