[−][src]Struct diesel_geometry::pg::types::sql_types::Box
The PostgreSQL Box type.
ToSql
impls
FromSql
impls
Examples
use diesel_geometry::data_types::{PgPoint, PgBox}; use diesel_geometry::sql_types; table! { use diesel::sql_types::*; use diesel_geometry::sql_types::Point; items { id -> Integer, name -> VarChar, location -> Point, } } insert_into(items) .values((name.eq("Shiny Thing"), location.eq(PgPoint(3.1, 9.4)))) .returning(location) .execute(&connection) .unwrap(); let inserted_location = items .select(location) .filter(location.is_contained_by( PgBox(PgPoint(0.,0.), PgPoint(10.,10.)).into_sql::<sql_types::Box>() )) .first(&connection); assert_eq!(Ok(PgPoint(3.1, 9.4)), inserted_location);
Trait Implementations
impl<T: Expression<SqlType = Box>> PgSameAsExpressionMethods<Box> for T
[src]
fn same_as<T>(self, other: T) -> SameAs<Self, T::Expression> where
T: AsExpression<ST>,
[src]
T: AsExpression<ST>,
Creates a PostgresSQL ~=
expression. Read more
impl<T> PgIsContainedByExpressionMethods<Box> for T where
T: Expression,
T::SqlType: CanBeContainedByBox,
[src]
T: Expression,
T::SqlType: CanBeContainedByBox,
fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T::Expression> where
T: AsExpression<ST>,
[src]
T: AsExpression<ST>,
Creates a PostgresSQL <@
expression. Read more
impl CanBeContainedByBox for Box
[src]
impl Copy for Box
[src]
impl Clone for Box
[src]
fn clone(&self) -> Box
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Box
[src]
impl Debug for Box
[src]
impl<'expr> AsExpression<Box> for &'expr PgBox
[src]
type Expression = Bound<Box, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl<'expr2, 'expr> AsExpression<Box> for &'expr2 &'expr PgBox
[src]
type Expression = Bound<Box, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl AsExpression<Box> for PgBox
[src]
type Expression = Bound<Box, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl HasSqlType<Box> for Pg
[src]
fn metadata(_: &PgMetadataLookup) -> PgTypeMetadata
[src]
impl NotNull for Box
[src]
impl SingleValue for Box
[src]
impl QueryId for Box
[src]
type QueryId = Box
A type which uniquely represents Self
in a SQL query. Read more
const HAS_STATIC_QUERY_ID: bool
[src]
fn query_id() -> Option<TypeId>
[src]
Returns the type id of Self::QueryId
if Self::HAS_STATIC_QUERY_ID
. Returns None
otherwise. Read more
impl ToSql<Box, Pg> for PgBox
[src]
impl FromSql<Box, Pg> for PgBox
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> IntoSql for T
[src]
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
[src]
Self: AsExpression<T>,
Convert self
to an expression for Diesel's query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel's query builder. Read more
impl<T> IntoNullable for T where
T: NotNull,
[src]
T: NotNull,