Struct sqlx_models_orm::Postgres
[−]pub struct Postgres;
Expand description
PostgreSQL database driver.
Trait Implementations
impl Database for Postgres
impl Database for Postgres
type Connection = PgConnection
type Connection = PgConnection
The concrete Connection
implementation for this database.
type TransactionManager = PgTransactionManager
type TransactionManager = PgTransactionManager
The concrete TransactionManager
implementation for this database.
type QueryResult = PgQueryResult
type QueryResult = PgQueryResult
The concrete QueryResult
implementation for this database.
type TypeInfo = PgTypeInfo
type TypeInfo = PgTypeInfo
The concrete TypeInfo
implementation for this database.
impl<'de> Decode<'de, Postgres> for PgInterval
impl<'de> Decode<'de, Postgres> for PgInterval
fn decode(
value: PgValueRef<'de>
) -> Result<PgInterval, Box<dyn Error + Sync + Send + 'static, Global>>
fn decode(
value: PgValueRef<'de>
) -> Result<PgInterval, Box<dyn Error + Sync + Send + 'static, Global>>
Decode a new value of this type using a raw value from the database.
impl<'r, T> Decode<'r, Postgres> for PgRange<T> where
T: Type<Postgres> + for<'a> Decode<'a, Postgres>,
impl<'r, T> Decode<'r, Postgres> for PgRange<T> where
T: Type<Postgres> + for<'a> Decode<'a, Postgres>,
impl<'r> Decode<'r, Postgres> for PgTimeTz<NaiveTime, FixedOffset>
impl<'r> Decode<'r, Postgres> for PgTimeTz<NaiveTime, FixedOffset>
impl<'r, T> Decode<'r, Postgres> for Vec<T, Global> where
T: for<'a> Decode<'a, Postgres> + Type<Postgres>,
impl<'r, T> Decode<'r, Postgres> for Vec<T, Global> where
T: for<'a> Decode<'a, Postgres> + Type<Postgres>,
impl Encode<'_, Postgres> for &[u8]
impl Encode<'_, Postgres> for &[u8]
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
impl Encode<'_, Postgres> for &str
impl Encode<'_, Postgres> for &str
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
impl Encode<'_, Postgres> for Oid
impl Encode<'_, Postgres> for Oid
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
impl Encode<'_, Postgres> for PgInterval
impl Encode<'_, Postgres> for PgInterval
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn size_hint(&self) -> usize
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
impl Encode<'_, Postgres> for PgLQuery
impl Encode<'_, Postgres> for PgLQuery
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
impl Encode<'_, Postgres> for PgLTree
impl Encode<'_, Postgres> for PgLTree
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
impl Encode<'_, Postgres> for PgMoney
impl Encode<'_, Postgres> for PgMoney
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
impl Encode<'_, Postgres> for PgTimeTz<NaiveTime, FixedOffset>
impl Encode<'_, Postgres> for PgTimeTz<NaiveTime, FixedOffset>
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn size_hint(&self) -> usize
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
impl Encode<'_, Postgres> for Vec<u8, Global>
impl Encode<'_, Postgres> for Vec<u8, Global>
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
impl<'q, T> Encode<'q, Postgres> for &[T] where
T: Encode<'q, Postgres> + Type<Postgres>,
impl<'q, T> Encode<'q, Postgres> for &[T] where
T: Encode<'q, Postgres> + Type<Postgres>,
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
impl<'q, T> Encode<'q, Postgres> for PgRange<T> where
T: Encode<'q, Postgres>,
impl<'q, T> Encode<'q, Postgres> for PgRange<T> where
T: Encode<'q, Postgres>,
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
impl<'q, T> Encode<'q, Postgres> for Vec<T, Global> where
T: Encode<'q, Postgres>,
&'a [T]: for<'a> Encode<'q, Postgres>,
impl<'q, T> Encode<'q, Postgres> for Vec<T, Global> where
T: Encode<'q, Postgres>,
&'a [T]: for<'a> Encode<'q, Postgres>,
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
impl HasArguments<'_> for Postgres
impl HasArguments<'_> for Postgres
type Database = Postgres
type Arguments = PgArguments
type Arguments = PgArguments
The concrete Arguments
implementation for this database.
type ArgumentBuffer = PgArgumentBuffer
type ArgumentBuffer = PgArgumentBuffer
The concrete type used as a buffer for arguments while encoding.
impl<'q> HasStatement<'q> for Postgres
impl<'q> HasStatement<'q> for Postgres
type Database = Postgres
type Statement = PgStatement<'q>
type Statement = PgStatement<'q>
The concrete Statement
implementation for this database.
impl<'r> HasValueRef<'r> for Postgres
impl<'r> HasValueRef<'r> for Postgres
type Database = Postgres
type ValueRef = PgValueRef<'r>
type ValueRef = PgValueRef<'r>
The concrete type used to hold a reference to the not-yet-decoded value that has just been received from the database. Read more
impl MigrateDatabase for Postgres
impl MigrateDatabase for Postgres
impl<Time, Offset> Type<Postgres> for [PgTimeTz<Time, Offset>] where
PgTimeTz<Time, Offset>: Type<Postgres>,
impl<Time, Offset> Type<Postgres> for [PgTimeTz<Time, Offset>] where
PgTimeTz<Time, Offset>: Type<Postgres>,
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl<T> Type<Postgres> for [T] where
T: PgHasArrayType,
impl<T> Type<Postgres> for [T] where
T: PgHasArrayType,
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Type<Postgres> for Oid
impl Type<Postgres> for Oid
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Type<Postgres> for PgInterval
impl Type<Postgres> for PgInterval
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Type<Postgres> for PgLQuery
impl Type<Postgres> for PgLQuery
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Type<Postgres> for PgLTree
impl Type<Postgres> for PgLTree
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Type<Postgres> for PgMoney
impl Type<Postgres> for PgMoney
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl<Tz> Type<Postgres> for PgRange<DateTime<Tz>> where
Tz: TimeZone,
impl<Tz> Type<Postgres> for PgRange<DateTime<Tz>> where
Tz: TimeZone,
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Type<Postgres> for PgRange<Decimal>
impl Type<Postgres> for PgRange<Decimal>
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Type<Postgres> for PgRange<NaiveDate>
impl Type<Postgres> for PgRange<NaiveDate>
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Type<Postgres> for PgRange<NaiveDateTime>
impl Type<Postgres> for PgRange<NaiveDateTime>
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Type<Postgres> for PgRange<i32>
impl Type<Postgres> for PgRange<i32>
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Type<Postgres> for PgRange<i64>
impl Type<Postgres> for PgRange<i64>
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Type<Postgres> for PgTimeTz<NaiveTime, FixedOffset>
impl Type<Postgres> for PgTimeTz<NaiveTime, FixedOffset>
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl<Time, Offset> Type<Postgres> for Vec<PgTimeTz<Time, Offset>, Global> where
PgTimeTz<Time, Offset>: Type<Postgres>,
impl<Time, Offset> Type<Postgres> for Vec<PgTimeTz<Time, Offset>, Global> where
PgTimeTz<Time, Offset>: Type<Postgres>,
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
fn compatible(ty: &<DB as Database>::TypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl<T> Type<Postgres> for Vec<T, Global> where
T: PgHasArrayType,
impl<T> Type<Postgres> for Vec<T, Global> where
T: PgHasArrayType,
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Type<Postgres> for str
impl Type<Postgres> for str
fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl HasStatementCache for Postgres
Auto Trait Implementations
impl RefUnwindSafe for Postgres
impl Send for Postgres
impl Sync for Postgres
impl Unpin for Postgres
impl UnwindSafe for Postgres
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more