backend::schema::plantings

Struct table

source
pub struct table;
Expand description

The actual table struct

This is the type which provides the base methods of the query builder, such as .select and .filter.

Implementations§

source§

impl table

source

pub fn star(&self) -> star

Represents table_name.*, which is sometimes necessary for efficient count queries. It cannot be used in place of all_columns

Trait Implementations§

source§

impl<S1, S2> AliasAliasAppearsInFromClause<table, S2, S1> for table

source§

type Count = <S1 as AliasAliasAppearsInFromClauseSameTable<S2, table>>::Count

Will be passed on to the impl AppearsInFromClause<QS>
source§

impl<S> AliasAppearsInFromClause<S, table> for table
where S: AliasSource<Target = table>,

source§

type Count = Never

Will be passed on to the impl AppearsInFromClause<QS>
source§

impl<S> AppearsInFromClause<Alias<S>> for table
where S: AliasSource,

source§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<Only<table>> for table

source§

type Count = Once

How many times does Self appear in QS?
source§

impl<TSM> AppearsInFromClause<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

type Count = Once

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for NoFromClause

source§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for Only<table>

source§

type Count = Once

How many times does Self appear in QS?
source§

impl<TSM> AppearsInFromClause<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

type Count = Once

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

source§

type Count = Once

How many times does Self appear in QS?
source§

impl AsQuery for table

source§

type SqlType = (Uuid, Integer, Integer, Integer, Integer, Integer, Float, Nullable<Date>, Nullable<Date>, Nullable<Integer>, Bool, Text, Timestamp, Timestamp, Uuid, Uuid, Uuid, Nullable<Integer>)

The SQL type of Self::Query
source§

type Query = SelectStatement<FromClause<table>>

What kind of query does this type represent?
source§

fn as_query(self) -> Self::Query

Converts a type which semantically represents a SQL query into the actual query being executed. See the trait level docs for more.
source§

impl Clone for table

source§

fn clone(&self) -> table

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for table

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for table

source§

fn default() -> table

Returns the “default value” for a type. Read more
source§

impl HasTable for table

source§

type Table = table

The table this type is associated with.
source§

fn table() -> Self::Table

Returns the table this type is associated with.
source§

impl<'a, T> Insertable<T> for &'a table
where table: Insertable<T>,

source§

type Values = <table as Insertable<T>>::Values

The VALUES clause to insert these records Read more
source§

fn values(self) -> Self::Values

Construct Self::Values Read more
source§

impl<T> Insertable<T> for table
where <table as AsQuery>::Query: Insertable<T>,

source§

type Values = <<table as AsQuery>::Query as Insertable<T>>::Values

The VALUES clause to insert these records Read more
source§

fn values(self) -> Self::Values

Construct Self::Values Read more
source§

impl<'insert> Insertable<table> for &'insert NewPlanting

source§

type Values = <(Option<Grouped<Eq<id, <&'insert Uuid as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<plant_id, <&'insert i32 as AsExpression<<plant_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<x, <&'insert i32 as AsExpression<<x as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<y, <&'insert i32 as AsExpression<<y as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<size_x, <&'insert i32 as AsExpression<<size_x as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<size_y, <&'insert i32 as AsExpression<<size_y as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<rotation, <&'insert f32 as AsExpression<<rotation as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<add_date, <&'insert NaiveDate as AsExpression<<add_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<remove_date, <&'insert NaiveDate as AsExpression<<remove_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<seed_id, <&'insert i32 as AsExpression<<seed_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<is_area, <&'insert bool as AsExpression<<is_area as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_by, <&'insert Uuid as AsExpression<<created_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<modified_by, <&'insert Uuid as AsExpression<<modified_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<layer_id, <&'insert Uuid as AsExpression<<layer_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<height, <&'insert i32 as AsExpression<<height as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
source§

fn values( self, ) -> <(Option<Eq<id, &'insert Uuid>>, Option<Eq<plant_id, &'insert i32>>, Option<Eq<x, &'insert i32>>, Option<Eq<y, &'insert i32>>, Option<Eq<size_x, &'insert i32>>, Option<Eq<size_y, &'insert i32>>, Option<Eq<rotation, &'insert f32>>, Option<Eq<add_date, &'insert NaiveDate>>, Option<Eq<remove_date, &'insert NaiveDate>>, Option<Eq<seed_id, &'insert i32>>, Option<Eq<is_area, &'insert bool>>, Option<Eq<created_by, &'insert Uuid>>, Option<Eq<modified_by, &'insert Uuid>>, Option<Eq<layer_id, &'insert Uuid>>, Option<Eq<height, &'insert i32>>) as Insertable<table>>::Values

Construct Self::Values Read more
source§

fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
where T: Table, Self: Sized,

Insert self into a given table. Read more
source§

impl Insertable<table> for NewPlanting

source§

type Values = <(Option<Grouped<Eq<id, <Uuid as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<plant_id, <i32 as AsExpression<<plant_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<x, <i32 as AsExpression<<x as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<y, <i32 as AsExpression<<y as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<size_x, <i32 as AsExpression<<size_x as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<size_y, <i32 as AsExpression<<size_y as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<rotation, <f32 as AsExpression<<rotation as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<add_date, <NaiveDate as AsExpression<<add_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<remove_date, <NaiveDate as AsExpression<<remove_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<seed_id, <i32 as AsExpression<<seed_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<is_area, <bool as AsExpression<<is_area as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_by, <Uuid as AsExpression<<created_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<modified_by, <Uuid as AsExpression<<modified_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<layer_id, <Uuid as AsExpression<<layer_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<height, <i32 as AsExpression<<height as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
source§

fn values( self, ) -> <(Option<Eq<id, Uuid>>, Option<Eq<plant_id, i32>>, Option<Eq<x, i32>>, Option<Eq<y, i32>>, Option<Eq<size_x, i32>>, Option<Eq<size_y, i32>>, Option<Eq<rotation, f32>>, Option<Eq<add_date, NaiveDate>>, Option<Eq<remove_date, NaiveDate>>, Option<Eq<seed_id, i32>>, Option<Eq<is_area, bool>>, Option<Eq<created_by, Uuid>>, Option<Eq<modified_by, Uuid>>, Option<Eq<layer_id, Uuid>>, Option<Eq<height, i32>>) as Insertable<table>>::Values

Construct Self::Values Read more
source§

fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
where T: Table, Self: Sized,

Insert self into a given table. Read more
source§

impl IntoUpdateTarget for table

source§

type WhereClause = <<table as AsQuery>::Query as IntoUpdateTarget>::WhereClause

What is the WHERE clause of this target?
source§

fn into_update_target(self) -> UpdateTarget<Self::Table, Self::WhereClause>

Decomposes self into the table and where clause.
source§

impl<DB> QueryFragment<DB> for table

source§

fn walk_ast<'b>( &'b self, __diesel_internal_pass: AstPass<'_, 'b, DB>, ) -> QueryResult<()>

Walk over this QueryFragment for all passes. Read more
source§

fn to_sql( &self, out: &mut <DB as Backend>::QueryBuilder, backend: &DB, ) -> Result<(), Error>

Converts this QueryFragment to its SQL representation. Read more
source§

fn collect_binds<'b>( &'b self, out: &mut <DB as Backend>::BindCollector<'b>, metadata_lookup: &mut <DB as TypeMetadata>::MetadataLookup, backend: &'b DB, ) -> Result<(), Error>

Serializes all bind parameters in this query. Read more
source§

fn is_safe_to_cache_prepared(&self, backend: &DB) -> Result<bool, Error>

Is this query safe to store in the prepared statement cache? Read more
source§

fn is_noop(&self, backend: &DB) -> Result<bool, Error>

Does walking this AST have any effect?
source§

impl QueryId for table

source§

const HAS_STATIC_QUERY_ID: bool = true

Can the SQL generated by Self be uniquely identified by its type? Read more
source§

type QueryId = table

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

fn query_id() -> Option<TypeId>

Returns the type id of Self::QueryId if Self::HAS_STATIC_QUERY_ID. Returns None otherwise. Read more
source§

impl QuerySource for table

source§

type FromClause = StaticQueryFragmentInstance<table>

The type returned by from_clause
source§

type DefaultSelection = <table as Table>::AllColumns

The type returned by default_selection
source§

fn from_clause(&self) -> Self::FromClause

The actual FROM clause of this type. This is typically only called in QueryFragment implementations.
source§

fn default_selection(&self) -> Self::DefaultSelection

The default select clause of this type, which should be used if no select clause was explicitly specified. This should always be a tuple of all the desired columns, not star
source§

impl Table for table

source§

type PrimaryKey = id

The type returned by primary_key
source§

type AllColumns = (id, plant_id, x, y, size_x, size_y, rotation, add_date, remove_date, seed_id, is_area, notes, created_at, modified_at, created_by, modified_by, layer_id, height)

The type returned by all_columns
source§

fn primary_key(&self) -> Self::PrimaryKey

Returns the primary key of this table. Read more
source§

fn all_columns() -> Self::AllColumns

Returns a tuple of all columns belonging to this table.
source§

impl AppearsOnTable<table> for star

source§

impl Copy for table

source§

impl<S> JoinTo<Alias<S>> for table
where Alias<S>: JoinTo<table>,

source§

impl<Left, Right, Kind> JoinTo<Join<Left, Right, Kind>> for table
where Join<Left, Right, Kind>: JoinTo<table>, Left: QuerySource, Right: QuerySource,

source§

impl<S> JoinTo<Only<S>> for table
where Only<S>: JoinTo<table>,

source§

impl<S, TSM> JoinTo<Tablesample<S, TSM>> for table
where Tablesample<S, TSM>: JoinTo<table>, TSM: TablesampleMethod,

source§

impl JoinTo<table> for table

source§

impl JoinTo<table> for table

source§

impl JoinTo<table> for table

source§

impl JoinTo<table> for table

source§

impl JoinTo<table> for table

source§

impl JoinTo<table> for table

source§

impl SelectableExpression<table> for add_date

source§

impl SelectableExpression<table> for created_at

source§

impl SelectableExpression<table> for created_by

source§

impl SelectableExpression<table> for height

source§

impl SelectableExpression<table> for id

source§

impl SelectableExpression<table> for is_area

source§

impl SelectableExpression<table> for layer_id

source§

impl SelectableExpression<table> for modified_at

source§

impl SelectableExpression<table> for modified_by

source§

impl SelectableExpression<table> for notes

source§

impl SelectableExpression<table> for plant_id

source§

impl SelectableExpression<table> for remove_date

source§

impl SelectableExpression<table> for rotation

source§

impl SelectableExpression<table> for seed_id

source§

impl SelectableExpression<table> for size_x

source§

impl SelectableExpression<table> for size_y

source§

impl SelectableExpression<table> for star

source§

impl SelectableExpression<table> for x

source§

impl SelectableExpression<table> for y

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl TableNotEqual<Only<table>> for table

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<Tablesample<table, TSM>> for table
where TSM: TablesampleMethod,

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl TableNotEqual<table> for Only<table>

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl<TSM> TableNotEqual<table> for Tablesample<table, TSM>
where TSM: TablesampleMethod,

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl TableNotEqual<table> for table

source§

impl UndecoratedInsertRecord<table> for NewPlanting

Auto Trait Implementations§

§

impl Freeze for table

§

impl RefUnwindSafe for table

§

impl Send for table

§

impl Sync for table

§

impl Unpin for table

§

impl UnwindSafe for table

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T1, T2> AppearsInFromClause<T2> for T1
where T1: TableNotEqual<T2> + Table, T2: Table,

source§

type Count = Never

How many times does Self appear in QS?
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<'a, T, DB> BoxedDsl<'a, DB> for T

source§

type Output = <SelectStatement<FromClause<T>> as BoxedDsl<'a, DB>>::Output

The return type of internal_into_boxed
source§

fn internal_into_boxed(self) -> <T as BoxedDsl<'a, DB>>::Output

See the trait documentation.
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CombineDsl for T
where T: Table,

source§

type Query = <T as AsQuery>::Query

What kind of query does this type represent?
source§

fn union<Rhs>( self, rhs: Rhs, ) -> CombinationClause<Union, Distinct, <T as CombineDsl>::Query, <Rhs as AsQuery>::Query>
where Rhs: AsQuery<SqlType = <<T as CombineDsl>::Query as Query>::SqlType>,

Combine two queries using a SQL UNION Read more
source§

fn union_all<Rhs>( self, rhs: Rhs, ) -> CombinationClause<Union, All, <T as CombineDsl>::Query, <Rhs as AsQuery>::Query>
where Rhs: AsQuery<SqlType = <<T as CombineDsl>::Query as Query>::SqlType>,

Combine two queries using a SQL UNION ALL
source§

fn intersect<Rhs>( self, rhs: Rhs, ) -> CombinationClause<Intersect, Distinct, <T as CombineDsl>::Query, <Rhs as AsQuery>::Query>
where Rhs: AsQuery<SqlType = <<T as CombineDsl>::Query as Query>::SqlType>,

Combine two queries using a SQL INTERSECT
source§

fn intersect_all<Rhs>( self, rhs: Rhs, ) -> CombinationClause<Intersect, All, <T as CombineDsl>::Query, <Rhs as AsQuery>::Query>
where Rhs: AsQuery<SqlType = <<T as CombineDsl>::Query as Query>::SqlType>,

Combine two queries using a SQL INTERSECT ALL
source§

fn except<Rhs>( self, rhs: Rhs, ) -> CombinationClause<Except, Distinct, <T as CombineDsl>::Query, <Rhs as AsQuery>::Query>
where Rhs: AsQuery<SqlType = <<T as CombineDsl>::Query as Query>::SqlType>,

Combine two queries using a SQL EXCEPT
source§

fn except_all<Rhs>( self, rhs: Rhs, ) -> CombinationClause<Except, All, <T as CombineDsl>::Query, <Rhs as AsQuery>::Query>
where Rhs: AsQuery<SqlType = <<T as CombineDsl>::Query as Query>::SqlType>,

Combine two queries using a SQL EXCEPT ALL
source§

impl<T> CopyTarget for T

source§

type Table = T

The table targeted by the command
source§

type SqlType = <T as AsQuery>::SqlType

The sql side type of the target expression
source§

fn walk_target(pass: AstPass<'_, '_, Pg>) -> Result<(), Error>

source§

impl<T> DistinctDsl for T

source§

type Output = <SelectStatement<FromClause<T>> as DistinctDsl>::Output

The type returned by .distinct
source§

fn distinct(self) -> <SelectStatement<FromClause<T>> as DistinctDsl>::Output

See the trait documentation.
source§

impl<T, Selection> DistinctOnDsl<Selection> for T

source§

type Output = <SelectStatement<FromClause<T>> as DistinctOnDsl<Selection>>::Output

The type returned by .distinct_on
source§

fn distinct_on( self, selection: Selection, ) -> <T as DistinctOnDsl<Selection>>::Output

See the trait documentation
source§

impl<Conn, DB, T> ExecuteDsl<Conn, DB> for T
where Conn: AsyncConnection<Backend = DB>, DB: Backend, T: QueryFragment<DB> + QueryId + Send,

source§

fn execute<'conn, 'query>( query: T, conn: &'conn mut Conn, ) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>
where T: 'query,

Execute this command
source§

impl<Conn, DB, T> ExecuteDsl<Conn, DB> for T
where Conn: Connection<Backend = DB>, DB: Backend, T: QueryFragment<DB> + QueryId,

source§

fn execute(query: T, conn: &mut Conn) -> Result<usize, Error>

Execute this command
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> IntoSql for T

source§

fn into_sql<T>(self) -> Self::Expression

Convert self to an expression for Diesel’s query builder. Read more
source§

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
where &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,

Convert &self to an expression for Diesel’s query builder. Read more
source§

impl<T> JoinOnDsl for T
where T: QuerySource,

source§

fn on<On>(self, on: On) -> OnClauseWrapper<Self, On>

See the trait documentation.
source§

impl<Lhs, Rhs, On> JoinTo<OnClauseWrapper<Rhs, On>> for Lhs
where Lhs: Table,

source§

type FromClause = Rhs

source§

type OnClause = On

source§

fn join_target( rhs: OnClauseWrapper<Rhs, On>, ) -> (<Lhs as JoinTo<OnClauseWrapper<Rhs, On>>>::FromClause, <Lhs as JoinTo<OnClauseWrapper<Rhs, On>>>::OnClause)

source§

impl<T> LimitDsl for T
where T: Table, <T as AsQuery>::Query: LimitDsl,

source§

type Output = <<T as AsQuery>::Query as LimitDsl>::Output

The type returned by .limit
source§

fn limit(self, limit: i64) -> <T as LimitDsl>::Output

See the trait documentation
source§

impl<T, Lock> LockingDsl<Lock> for T

source§

type Output = <SelectStatement<FromClause<T>> as LockingDsl<Lock>>::Output

The type returned by set_lock. See dsl::ForUpdate and friends for convenient access to this type.
source§

fn with_lock(self, lock: Lock) -> <T as LockingDsl<Lock>>::Output

See the trait level documentation
source§

impl<T> OffsetDsl for T
where T: Table, <T as AsQuery>::Query: OffsetDsl,

source§

type Output = <<T as AsQuery>::Query as OffsetDsl>::Output

The type returned by .offset.
source§

fn offset(self, offset: i64) -> <T as OffsetDsl>::Output

See the trait documentation
source§

impl<T> OnlyDsl for T
where T: Table,

source§

fn only(self) -> Only<Self>

See the trait-level docs.
source§

impl<T> Paginate for T

source§

fn paginate(self, page: Option<i32>) -> PaginatedQuery<T>

Return a paginated version of a query for a specific page number.
source§

impl<T> QueryDsl for T
where T: Table,

source§

fn distinct(self) -> Self::Output
where Self: DistinctDsl,

Adds the DISTINCT keyword to a query. Read more
source§

fn distinct_on<Expr>(self, expr: Expr) -> Self::Output
where Self: DistinctOnDsl<Expr>,

Adds the DISTINCT ON clause to a query. Read more
source§

fn select<Selection>(self, selection: Selection) -> Self::Output
where Selection: Expression, Self: SelectDsl<Selection>,

Adds a SELECT clause to the query. Read more
source§

fn count(self) -> Self::Output
where Self: SelectDsl<CountStar>,

Get the count of a query. This is equivalent to .select(count_star()) Read more
source§

fn inner_join<Rhs>(self, rhs: Rhs) -> Self::Output
where Self: JoinWithImplicitOnClause<Rhs, Inner>,

Join two tables using a SQL INNER JOIN. Read more
source§

fn left_outer_join<Rhs>(self, rhs: Rhs) -> Self::Output

Join two tables using a SQL LEFT OUTER JOIN. Read more
source§

fn left_join<Rhs>(self, rhs: Rhs) -> Self::Output

Alias for left_outer_join.
source§

fn filter<Predicate>(self, predicate: Predicate) -> Self::Output
where Self: FilterDsl<Predicate>,

Adds to the WHERE clause of a query. Read more
source§

fn or_filter<Predicate>(self, predicate: Predicate) -> Self::Output
where Self: OrFilterDsl<Predicate>,

Adds to the WHERE clause of a query using OR Read more
source§

fn find<PK>(self, id: PK) -> Self::Output
where Self: FindDsl<PK>,

Attempts to find a single record from the given table by primary key. Read more
source§

fn order<Expr>(self, expr: Expr) -> Self::Output
where Expr: Expression, Self: OrderDsl<Expr>,

Sets the order clause of a query. Read more
source§

fn order_by<Expr>(self, expr: Expr) -> Self::Output
where Expr: Expression, Self: OrderDsl<Expr>,

Alias for order
source§

fn then_order_by<Order>(self, order: Order) -> Self::Output
where Self: ThenOrderDsl<Order>,

Appends to the ORDER BY clause of this SQL query. Read more
source§

fn limit(self, limit: i64) -> Self::Output
where Self: LimitDsl,

Sets the limit clause of the query. Read more
source§

fn offset(self, offset: i64) -> Self::Output
where Self: OffsetDsl,

Sets the offset clause of the query. Read more
source§

fn group_by<GB>(self, group_by: GB) -> Self::Output
where GB: Expression, Self: GroupByDsl<GB>,

Sets the group by clause of a query. Read more
source§

fn having<Predicate>(self, predicate: Predicate) -> Self::Output
where Self: HavingDsl<Predicate>,

Adds to the HAVING clause of a query. Read more
source§

fn for_update(self) -> Self::Output
where Self: LockingDsl<ForUpdate>,

Adds FOR UPDATE to the end of the select statement. Read more
source§

fn for_no_key_update(self) -> Self::Output

Adds FOR NO KEY UPDATE to the end of the select statement. Read more
source§

fn for_share(self) -> Self::Output
where Self: LockingDsl<ForShare>,

Adds FOR SHARE to the end of the select statement. Read more
source§

fn for_key_share(self) -> Self::Output
where Self: LockingDsl<ForKeyShare>,

Adds FOR KEY SHARE to the end of the select statement. Read more
source§

fn skip_locked(self) -> Self::Output

Adds SKIP LOCKED to the end of a FOR UPDATE clause. Read more
source§

fn no_wait(self) -> Self::Output
where Self: ModifyLockDsl<NoWait>,

Adds NOWAIT to the end of a FOR UPDATE clause. Read more
source§

fn into_boxed<'a, DB>(self) -> Self::Output
where DB: Backend, Self: BoxedDsl<'a, DB>,

Boxes the pieces of a query into a single type. Read more
source§

fn single_value(self) -> Self::Output
where Self: SingleValueDsl,

Wraps this select statement in parenthesis, allowing it to be used as an expression. Read more
source§

fn nullable(self) -> Self::Output
where Self: SelectNullableDsl,

Coerce the SQL type of the select clause to it’s nullable equivalent. Read more
source§

impl<T, DB> QueryFragmentForCachedStatement<DB> for T
where DB: Backend, <DB as Backend>::QueryBuilder: Default, T: QueryFragment<DB>,

source§

fn construct_sql(&self, backend: &DB) -> Result<String, Error>

Convert the query fragment into a SQL string for the given backend
source§

fn is_safe_to_cache_prepared(&self, backend: &DB) -> Result<bool, Error>

Check whether it’s safe to cache the query
source§

impl<T, Conn> RunQueryDsl<Conn> for T

source§

fn execute<'conn, 'query>( self, conn: &'conn mut Conn, ) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>
where Conn: AsyncConnection + Send, Self: ExecuteDsl<Conn> + 'query,

Executes the given command, returning the number of rows affected. Read more
source§

fn load<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(_: Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
where U: Send, Conn: AsyncConnection, Self: LoadQuery<'query, Conn, U> + 'query,

Executes the given query, returning a Vec with the returned rows. Read more
source§

fn load_stream<'conn, 'query, U>( self, conn: &'conn mut Conn, ) -> Self::LoadFuture<'conn>
where Conn: AsyncConnection, U: 'conn, Self: LoadQuery<'query, Conn, U> + 'query,

Executes the given query, returning a Stream with the returned rows. Read more
source§

fn get_result<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(_: Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>
where U: Send + 'conn, Conn: AsyncConnection, Self: LoadQuery<'query, Conn, U> + 'query,

Runs the command, and returns the affected row. Read more
source§

fn get_results<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(_: Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
where U: Send, Conn: AsyncConnection, Self: LoadQuery<'query, Conn, U> + 'query,

Runs the command, returning an Vec with the affected rows. Read more
source§

fn first<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(_: <Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
where U: Send + 'conn, Conn: AsyncConnection, Self: LimitDsl, Self::Output: LoadQuery<'query, Conn, U> + Send + 'query,

Attempts to load a single record. Read more
source§

impl<T, Conn> RunQueryDsl<Conn> for T
where T: Table,

source§

fn execute(self, conn: &mut Conn) -> Result<usize, Error>
where Conn: Connection, Self: ExecuteDsl<Conn>,

Executes the given command, returning the number of rows affected. Read more
source§

fn load<'query, U>(self, conn: &mut Conn) -> Result<Vec<U>, Error>
where Self: LoadQuery<'query, Conn, U>,

Executes the given query, returning a Vec with the returned rows. Read more
source§

fn load_iter<'conn, 'query, U, B>( self, conn: &'conn mut Conn, ) -> Result<Self::RowIter<'conn>, Error>
where 'query: 'conn, U: 'conn, Self: LoadQuery<'query, Conn, U, B> + 'conn,

Executes the given query, returning an Iterator with the returned rows. Read more
source§

fn get_result<'query, U>(self, conn: &mut Conn) -> Result<U, Error>
where Self: LoadQuery<'query, Conn, U>,

Runs the command, and returns the affected row. Read more
source§

fn get_results<'query, U>(self, conn: &mut Conn) -> Result<Vec<U>, Error>
where Self: LoadQuery<'query, Conn, U>,

Runs the command, returning an Vec with the affected rows. Read more
source§

fn first<'query, U>(self, conn: &mut Conn) -> Result<U, Error>
where Self: LimitDsl, Self::Output: LoadQuery<'query, Conn, U>,

Attempts to load a single record. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T> TablesampleDsl for T
where T: Table,

source§

fn tablesample_bernoulli( self, portion: i16, ) -> Tablesample<Self, BernoulliMethod>

See the trait-level docs.
source§

fn tablesample_system(self, portion: i16) -> Tablesample<Self, SystemMethod>

See the trait-level docs.
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more