[−][src]Trait diesel_geometry::expression_methods::PgSameAsExpressionMethods
Provided methods
fn same_as<T>(self, other: T) -> SameAs<Self, T::Expression> where
T: AsExpression<ST>,
T: AsExpression<ST>,
Creates a PostgresSQL ~=
expression.
The "same as" operator, ~=, represents the usual notion of equality for the point
, box
,
polygon
, and circle
types. Some of these types have an = operator, but = compares for
equal areas only. The other scalar operators (<= and so on) likewise compare areas for
these types.
Example
let found_drawing_id = shapes .select(drawing_id) .filter(centroid.same_as(PgPoint(1.0, 2.0))) .first(&connection); assert_eq!(Ok(2), found_drawing_id);
Implementors
impl<T: Expression<SqlType = Point>> PgSameAsExpressionMethods<Point> for T
[src]
fn same_as<T>(self, other: T) -> SameAs<Self, T::Expression> where
T: AsExpression<ST>,
[src]
T: AsExpression<ST>,
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>,
impl<T: Expression<SqlType = Circle>> PgSameAsExpressionMethods<Circle> for T
[src]
fn same_as<T>(self, other: T) -> SameAs<Self, T::Expression> where
T: AsExpression<ST>,
[src]
T: AsExpression<ST>,