The actual table struct
This is the type which provides the base methods of the query
builder, such as .select and .filter.
Represents table_name.*, which is sometimes necessary
for efficient count queries. It cannot be used in place of
all_columns
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
type Table = Self
The table this type is associated with.
Returns the table this type is associated with.
The type returned by primary_key
The type returned by all_columns
Returns the primary key of this table. Read more
Returns a tuple of all columns belonging to this table.
The VALUES clause to insert these records Read more
The VALUES clause to insert these records Read more
type FromClause = Identifier<'static>
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
impl<Left, Right, Kind> JoinTo<Join<Left, Right, Kind>> for table where Join<Left, Right, Kind>: JoinTo<table>, | |
impl<F, S, D, W, O, L, Of, G> JoinTo<SelectStatement<F, S, D, W, O, L, Of, G, NoLockingClause>> for table where SelectStatement<F, S, D, W, O, L, Of, G>: JoinTo<table>, | |
type FromClause = SelectStatement<F, S, D, W, O, L, Of, G>
type OnClause = <SelectStatement<F, S, D, W, O, L, Of, G> as JoinTo<table>>::OnClause
impl<'a, QS, ST, DB> JoinTo<BoxedSelectStatement<'a, QS, ST, DB>> for table where BoxedSelectStatement<'a, QS, ST, DB>: JoinTo<table>, | |
type FromClause = BoxedSelectStatement<'a, QS, ST, DB>
The SQL type of Self::Query
type Query = SelectStatement<Self>
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
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
impl IntoUpdateTarget for table | |
type WhereClause = <Self::Query as IntoUpdateTarget>::WhereClause
What is the WHERE clause of this target?
Decomposes self into the table and where clause.
type Count = Once
How many times does Self appear in QS?
impl AppearsInFromClause<table> for () | |
type Count = Never
How many times does Self appear in QS?
type Count = Never
How many times does Self appear in QS?
type Count = Never
How many times does Self appear in QS?
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
The type returned by .group_by
See the trait documentation.
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
Runs the command, and returns the affected row. Read more
Runs the command, returning an Vec with the affected rows. Read more
fn first<U>(self, conn: &Conn) -> Result<U, Error> where Self: LimitDsl, Self::Output: LoadQuery<Conn, U>, | [src] |
Adds the DISTINCT keyword to a query. Read more
fn select<Selection>(self, selection: Selection) -> Self::Output where Selection: Expression, Self: SelectDsl<Selection>, | [src] |
fn count(self) -> Self::Output where Self: SelectDsl<CountStar>, | [src] |
Get the count of a query. This is equivalent to .select(count_star()) Read more
fn inner_join<Rhs>(self, rhs: Rhs) -> Self::Output where Self: JoinWithImplicitOnClause<Rhs, Inner>, | [src] |
Join two tables using a SQL INNER JOIN. Read more
fn left_outer_join<Rhs>(self, rhs: Rhs) -> Self::Output where Self: JoinWithImplicitOnClause<Rhs, LeftOuter>, | [src] |
Join two tables using a SQL LEFT OUTER JOIN. Read more
fn left_join<Rhs>(self, rhs: Rhs) -> Self::Output where Self: JoinWithImplicitOnClause<Rhs, LeftOuter>, | [src] |
fn filter<Predicate>(self, predicate: Predicate) -> Self::Output where Self: FilterDsl<Predicate>, | [src] |
Adds to the WHERE clause of a query. Read more
fn or_filter<Predicate>(self, predicate: Predicate) -> Self::Output where Self: OrFilterDsl<Predicate>, | [src] |
Adds to the WHERE clause of a query using OR Read more
fn find<PK>(self, id: PK) -> Self::Output where Self: FindDsl<PK>, | [src] |
Attempts to find a single record from the given table by primary key. Read more
fn order<Expr>(self, expr: Expr) -> Self::Output where Expr: Expression, Self: OrderDsl<Expr>, | [src] |
fn then_order_by<Order>(self, order: Order) -> Self::Output where Self: ThenOrderDsl<Order>, | [src] |
Appends to the ORDER BY clause of this SQL query. Read more
fn limit(self, limit: i64) -> Self::Output where Self: LimitDsl, | [src] |
Sets the limit clause of the query. Read more
fn offset(self, offset: i64) -> Self::Output where Self: OffsetDsl, | [src] |
Sets the offset clause of the 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
fn for_share(self) -> Self::Output where Self: LockingDsl<ForShare>, | [src] |
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
fn skip_locked(self) -> Self::Output where Self: ModifyLockDsl<SkipLocked>, | [src] |
Adds SKIP LOCKED to the end of a FOR UPDATE clause. Read more
fn no_wait(self) -> Self::Output where Self: ModifyLockDsl<NoWait>, | [src] |
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
fn on<On>(self, on: On) -> OnClauseWrapper<Self, On> | [src] |
See the trait documentation.
Convert self to an expression for Diesel's query builder. Read more
Convert &self to an expression for Diesel's query builder. Read more