pub struct Alias<S> { /* private fields */ }
Expand description

Represents an alias within diesel’s query builder

See alias! for more details.

Implementations

Maps a single field of the source table in this alias

Maps multiple fields of the source table in this alias (takes in tuples and some expressions)

Trait Implementations

How many times does Self appear in QS?

The SQL type of Self::Query

What kind of query does this type represent?

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

The return type of internal_into_boxed

See the trait documentation.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

What kind of query does this type represent?

Combine two queries using a SQL UNION Read more

Combine two queries using a SQL UNION ALL

Combine two queries using a SQL INTERSECT

Combine two queries using a SQL INTERSECT ALL

Combine two queries using a SQL EXCEPT

Combine two queries using a SQL EXCEPT ALL

Formats the value using the given formatter. Read more

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

The type returned by .distinct_on

See the trait documentation

The type returned by .filter.

See the trait documentation.

The type returned by .find.

See the trait documentation.

The type returned by .group_by

See the trait documentation.

The type returned by .limit

See the trait documentation

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

See the trait level documentation

The type returned by .offset.

See the trait documentation

The type returned by .filter.

See the trait documentation.

The type returned by .order.

See the trait documentation.

Adds the DISTINCT keyword to a query. Read more

Available on crate feature postgres only.

Adds the DISTINCT ON clause to a query. Read more

Adds a SELECT clause to the query. Read more

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

Join two tables using a SQL INNER JOIN. Read more

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

Adds to the WHERE clause of a query. Read more

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

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

Sets the order clause of a query. Read more

Alias for order

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

Sets the limit clause of the query. Read more

Sets the offset clause of the query. Read more

Sets the group by clause of a query. Read more

Adds to the HAVING clause of a query. Read more

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

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

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

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

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

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

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

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

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

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

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

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

The type returned by from_clause

The type returned by default_selection

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

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 Read more

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

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

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

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

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

Attempts to load a single record. Read more

The type returned by .select

See the trait documentation

The type returned by .then_order_by.

See the trait documentation.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Execute this command

Returns the argument unchanged.

Calls U::from(self).

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

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

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

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.