[][src]Struct diesel_geometry::pg::types::sql_types::Circle

pub struct Circle;

The PostgreSQL Circle type.

ToSql impls

FromSql impls

Examples

use diesel_geometry::data_types::PgCircle;


table! {
    use diesel::sql_types::*;
    use diesel_geometry::sql_types::Circle;
    items {
        id -> Integer,
        name -> VarChar,
        location -> Circle,
    }
}

let inserted_location = insert_into(items)
    .values((name.eq("Shiny Thing"), location.eq(PgCircle(PgPoint(3.1, 6.6), 9.4))))
    .returning(location)
    .get_result(&connection);
assert_eq!(Ok(PgCircle(PgPoint(3.1, 6.6), 9.4)), inserted_location);

Trait Implementations

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]

Creates a PostgresSQL ~= expression. Read more

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]

Creates a PostgresSQL <@ expression. Read more

impl CanBeContainedByCircle for Circle[src]

impl CanBeContainedByBox for Circle[src]

impl Copy for Circle[src]

impl Clone for Circle[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Circle[src]

impl Debug for Circle[src]

impl<'expr> AsExpression<Circle> for &'expr PgCircle[src]

type Expression = Bound<Circle, Self>

The expression being returned

impl<'expr2, 'expr> AsExpression<Circle> for &'expr2 &'expr PgCircle[src]

type Expression = Bound<Circle, Self>

The expression being returned

impl AsExpression<Circle> for PgCircle[src]

type Expression = Bound<Circle, Self>

The expression being returned

impl HasSqlType<Circle> for Pg[src]

impl NotNull for Circle[src]

impl SingleValue for Circle[src]

impl QueryId for Circle[src]

type QueryId = Circle

A type which uniquely represents Self in a SQL query. Read more

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<Circle, Pg> for PgCircle[src]

impl FromSql<Circle, Pg> for PgCircle[src]

Auto Trait Implementations

impl Send for Circle

impl Sync for Circle

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> IntoSql for T[src]

fn into_sql<T>(self) -> Self::Expression where
    Self: AsExpression<T>, 
[src]

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]

Convert &self to an expression for Diesel's query builder. Read more

impl<T> IntoNullable for T where
    T: NotNull
[src]

type Nullable = Nullable<T>

The nullable representation of this type. Read more