[−][src]Trait diesel_geometry::expression_methods::PgIsContainedByExpressionMethods
Provided methods
fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T::Expression> where
T: AsExpression<ST>,
T: AsExpression<ST>,
Creates a PostgresSQL <@
expression.
For geometric types.
Example
// Looking for point at (1,2) let found_drawing_id = shapes .select(drawing_id) .filter( centroid.is_contained_by( PgBox(PgPoint(0.5, 1.5), PgPoint(3.0,5.0)).into_sql::<sql_types::Box>() ) ) .first(&connection); assert_eq!(Ok(2), found_drawing_id);
Implementors
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>,
impl<T> PgIsContainedByExpressionMethods<Circle> for T where
T: Expression,
T::SqlType: CanBeContainedByCircle,
[src]
T: Expression,
T::SqlType: CanBeContainedByCircle,
fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T::Expression> where
T: AsExpression<ST>,
[src]
T: AsExpression<ST>,