[][src]Trait diesel_geometry::expression_methods::PgIsContainedByExpressionMethods

pub trait PgIsContainedByExpressionMethods<ST>: Expression + Sized {
    fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T::Expression>
    where
        T: AsExpression<ST>
, { ... } }

Provided methods

fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T::Expression> where
    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);
Loading content...

Implementors

impl<T> PgIsContainedByExpressionMethods<Box> for T where
    T: Expression,
    T::SqlType: CanBeContainedByBox
[src]

fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T::Expression> where
    T: AsExpression<ST>, 
[src]

impl<T> PgIsContainedByExpressionMethods<Circle> for T where
    T: Expression,
    T::SqlType: CanBeContainedByCircle
[src]

fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T::Expression> where
    T: AsExpression<ST>, 
[src]

Loading content...