[−]Struct edit_server::db::schema::posts::table
The actual table struct
This is the type which provides the base methods of the query
builder, such as .select
and .filter
.
Methods
impl table
impl table
pub fn star(&self) -> star
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
impl Clone for table
impl Clone for table
fn clone(&self) -> table
fn clone(&self) -> table
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for table
impl Copy for table
impl Debug for table
impl Debug for table
impl<Left, Right, Kind> JoinTo<Join<Left, Right, Kind>> for table where
Join<Left, Right, Kind>: JoinTo<table>,
impl<Left, Right, Kind> JoinTo<Join<Left, Right, Kind>> for table where
Join<Left, Right, Kind>: JoinTo<table>,
type FromClause = Join<Left, Right, Kind>
type OnClause = <Join<Left, Right, Kind> as JoinTo<table>>::OnClause
fn join_target(
rhs: Join<Left, Right, Kind>
) -> (Self::FromClause, Self::OnClause)
fn join_target(
rhs: Join<Left, Right, Kind>
) -> (Self::FromClause, Self::OnClause)
impl<Join, On> JoinTo<JoinOn<Join, On>> for table where
JoinOn<Join, On>: JoinTo<table>,
impl<Join, On> JoinTo<JoinOn<Join, On>> for table where
JoinOn<Join, On>: JoinTo<table>,
type FromClause = JoinOn<Join, On>
type OnClause = <JoinOn<Join, On> as JoinTo<table>>::OnClause
fn join_target(rhs: JoinOn<Join, On>) -> (Self::FromClause, Self::OnClause)
fn join_target(rhs: JoinOn<Join, On>) -> (Self::FromClause, Self::OnClause)
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>,
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
fn join_target(
rhs: SelectStatement<F, S, D, W, O, L, Of, G>
) -> (Self::FromClause, Self::OnClause)
fn join_target(
rhs: SelectStatement<F, S, D, W, O, L, Of, G>
) -> (Self::FromClause, Self::OnClause)
impl<'a, QS, ST, DB> JoinTo<BoxedSelectStatement<'a, QS, ST, DB>> for table where
BoxedSelectStatement<'a, QS, ST, DB>: JoinTo<table>,
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>
type OnClause = <BoxedSelectStatement<'a, QS, ST, DB> as JoinTo<table>>::OnClause
fn join_target(
rhs: BoxedSelectStatement<'a, QS, ST, DB>
) -> (Self::FromClause, Self::OnClause)
fn join_target(
rhs: BoxedSelectStatement<'a, QS, ST, DB>
) -> (Self::FromClause, Self::OnClause)
impl HasTable for table
impl HasTable for table
impl Table for table
impl Table for table
type PrimaryKey = id
The type returned by primary_key
type AllColumns = (id, body)
The type returned by all_columns
fn primary_key(&self) -> Self::PrimaryKey
fn primary_key(&self) -> Self::PrimaryKey
fn all_columns() -> Self::AllColumns
fn all_columns() -> Self::AllColumns
impl<T> Insertable<T> for table where
<table as AsQuery>::Query: Insertable<T>,
impl<T> Insertable<T> for table where
<table as AsQuery>::Query: Insertable<T>,
type Values = <<table as AsQuery>::Query as Insertable<T>>::Values
The VALUES
clause to insert these records Read more
fn values(self) -> Self::Values
fn values(self) -> Self::Values
fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
Insert self
into a given table. Read more
impl<'a, T> Insertable<T> for &'a table where
table: Insertable<T>,
impl<'a, T> Insertable<T> for &'a table where
table: Insertable<T>,
type Values = <table as Insertable<T>>::Values
The VALUES
clause to insert these records Read more
fn values(self) -> Self::Values
fn values(self) -> Self::Values
fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
Insert self
into a given table. Read more
impl<'a, 'insert> Insertable<table> for NewPost<'a>
[src]
impl<'a, 'insert> Insertable<table> for NewPost<'a>
type Values = <(Option<Eq<id, &'a str>>, Option<Eq<body, &'a str>>) as Insertable<table>>::Values
The VALUES
clause to insert these records Read more
fn values(self) -> Self::Values
[src]
fn values(self) -> Self::Values
fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
Insert self
into a given table. Read more
impl<'a, 'insert> Insertable<table> for &'insert NewPost<'a>
[src]
impl<'a, 'insert> Insertable<table> for &'insert NewPost<'a>
type Values = <(Option<Eq<id, &'insert &'a str>>, Option<Eq<body, &'insert &'a str>>) as Insertable<table>>::Values
The VALUES
clause to insert these records Read more
fn values(self) -> Self::Values
[src]
fn values(self) -> Self::Values
fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
Insert self
into a given table. Read more
impl AppearsOnTable<table> for star
impl AppearsOnTable<table> for star
impl QuerySource for table
impl QuerySource for table
type FromClause = Identifier<'static>
The type returned by from_clause
type DefaultSelection = Self::AllColumns
The type returned by default_selection
fn from_clause(&self) -> Self::FromClause
fn from_clause(&self) -> Self::FromClause
fn default_selection(&self) -> Self::DefaultSelection
fn default_selection(&self) -> Self::DefaultSelection
impl SelectableExpression<table> for star
impl SelectableExpression<table> for star
impl SelectableExpression<table> for id
impl SelectableExpression<table> for id
impl SelectableExpression<table> for body
impl SelectableExpression<table> for body
impl<'a, 'insert> UndecoratedInsertRecord<table> for NewPost<'a>
[src]
impl<'a, 'insert> UndecoratedInsertRecord<table> for NewPost<'a>
impl IntoUpdateTarget for table
impl IntoUpdateTarget for table
type WhereClause = <Self::Query as IntoUpdateTarget>::WhereClause
What is the WHERE
clause of this target?
fn into_update_target(self) -> UpdateTarget<Self::Table, Self::WhereClause>
fn into_update_target(self) -> UpdateTarget<Self::Table, Self::WhereClause>
impl QueryId for table
impl QueryId for table
type QueryId = table
A type which uniquely represents Self
in a SQL query. Read more
const HAS_STATIC_QUERY_ID: bool
fn query_id() -> Option<TypeId>
fn query_id() -> Option<TypeId>
Returns the type id of Self::QueryId
if Self::HAS_STATIC_QUERY_ID
. Returns None
otherwise. Read more
impl AsQuery for table
impl AsQuery for table
type SqlType = SqlType
The SQL type of Self::Query
type Query = SelectStatement<Self>
What kind of query does this type represent?
fn as_query(self) -> Self::Query
fn as_query(self) -> Self::Query
impl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Once
How many times does Self
appear in QS
?
impl AppearsInFromClause<table> for ()
impl AppearsInFromClause<table> for ()
type Count = Never
How many times does Self
appear in QS
?
impl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
How many times does Self
appear in QS
?
impl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
How many times does Self
appear in QS
?
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<Lhs, Rhs, On> JoinTo for Lhs where
Lhs: Table,
impl<Lhs, Rhs, On> JoinTo for Lhs where
Lhs: Table,
type FromClause = Rhs
type OnClause = On
fn join_target(
rhs: OnClauseWrapper<Rhs, On>
) -> (<Lhs as JoinTo<OnClauseWrapper<Rhs, On>>>::FromClause, <Lhs as JoinTo<OnClauseWrapper<Rhs, On>>>::OnClause)
fn join_target(
rhs: OnClauseWrapper<Rhs, On>
) -> (<Lhs as JoinTo<OnClauseWrapper<Rhs, On>>>::FromClause, <Lhs as JoinTo<OnClauseWrapper<Rhs, On>>>::OnClause)
impl<T> IntoSql for T
impl<T> IntoSql for T
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
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>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel's query builder. Read more
impl<T, Expr> GroupByDsl for T where
Expr: Expression,
T: Table + AsQuery,
<T as AsQuery>::Query: GroupByDsl<Expr>,
impl<T, Expr> GroupByDsl for T where
Expr: Expression,
T: Table + AsQuery,
<T as AsQuery>::Query: GroupByDsl<Expr>,
type Output = <<T as AsQuery>::Query as GroupByDsl<Expr>>::Output
The type returned by .group_by
fn group_by(self, expr: Expr) -> <T as GroupByDsl<Expr>>::Output
fn group_by(self, expr: Expr) -> <T as GroupByDsl<Expr>>::Output
impl<T, Conn> RunQueryDsl for T where
T: Table,
impl<T, Conn> RunQueryDsl for T where
T: Table,
fn execute(self, conn: &Conn) -> Result<usize, Error> where
Conn: Connection,
Self: ExecuteDsl<Conn, <Conn as Connection>::Backend>,
fn execute(self, conn: &Conn) -> Result<usize, Error> where
Conn: Connection,
Self: ExecuteDsl<Conn, <Conn as Connection>::Backend>,
Executes the given command, returning the number of rows affected. Read more
fn load<U>(self, conn: &Conn) -> Result<Vec<U>, Error> where
Self: LoadQuery<Conn, U>,
fn load<U>(self, conn: &Conn) -> Result<Vec<U>, Error> where
Self: LoadQuery<Conn, U>,
Executes the given query, returning a Vec
with the returned rows. Read more
fn get_result<U>(self, conn: &Conn) -> Result<U, Error> where
Self: LoadQuery<Conn, U>,
fn get_result<U>(self, conn: &Conn) -> Result<U, Error> where
Self: LoadQuery<Conn, U>,
Runs the command, and returns the affected row. Read more
fn get_results<U>(self, conn: &Conn) -> Result<Vec<U>, Error> where
Self: LoadQuery<Conn, U>,
fn get_results<U>(self, conn: &Conn) -> Result<Vec<U>, Error> where
Self: LoadQuery<Conn, U>,
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>,
fn first<U>(self, conn: &Conn) -> Result<U, Error> where
Self: LimitDsl,
Self::Output: LoadQuery<Conn, U>,
Attempts to load a single record. Read more
impl<T> QueryDsl for T where
T: Table,
impl<T> QueryDsl for T where
T: Table,
fn distinct(self) -> Self::Output where
Self: DistinctDsl,
fn distinct(self) -> Self::Output where
Self: DistinctDsl,
Adds the DISTINCT
keyword to a query. Read more
fn select<Selection>(self, selection: Selection) -> Self::Output where
Selection: Expression,
Self: SelectDsl<Selection>,
fn select<Selection>(self, selection: Selection) -> Self::Output where
Selection: Expression,
Self: SelectDsl<Selection>,
Adds a SELECT
clause to the query. Read more
fn count(self) -> Self::Output where
Self: SelectDsl<CountStar>,
fn count(self) -> Self::Output where
Self: SelectDsl<CountStar>,
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>,
fn inner_join<Rhs>(self, rhs: Rhs) -> Self::Output where
Self: JoinWithImplicitOnClause<Rhs, Inner>,
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>,
fn left_outer_join<Rhs>(self, rhs: Rhs) -> Self::Output where
Self: JoinWithImplicitOnClause<Rhs, LeftOuter>,
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>,
fn left_join<Rhs>(self, rhs: Rhs) -> Self::Output where
Self: JoinWithImplicitOnClause<Rhs, LeftOuter>,
Alias for [left_outer_join
]. Read more
fn filter<Predicate>(self, predicate: Predicate) -> Self::Output where
Self: FilterDsl<Predicate>,
fn filter<Predicate>(self, predicate: Predicate) -> Self::Output where
Self: FilterDsl<Predicate>,
Adds to the WHERE
clause of a query. Read more
fn or_filter<Predicate>(self, predicate: Predicate) -> Self::Output where
Self: OrFilterDsl<Predicate>,
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
fn find<PK>(self, id: PK) -> Self::Output where
Self: FindDsl<PK>,
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
fn order<Expr>(self, expr: Expr) -> Self::Output where
Expr: Expression,
Self: OrderDsl<Expr>,
fn order<Expr>(self, expr: Expr) -> Self::Output where
Expr: Expression,
Self: OrderDsl<Expr>,
Sets the order clause of a query. Read more
fn order_by<Expr>(self, expr: Expr) -> Self::Output where
Expr: Expression,
Self: OrderDsl<Expr>,
fn order_by<Expr>(self, expr: Expr) -> Self::Output where
Expr: Expression,
Self: OrderDsl<Expr>,
Alias for order
fn then_order_by<Order>(self, order: Order) -> Self::Output where
Self: ThenOrderDsl<Order>,
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
fn limit(self, limit: i64) -> Self::Output where
Self: LimitDsl,
fn limit(self, limit: i64) -> Self::Output where
Self: LimitDsl,
Sets the limit clause of the query. Read more
fn offset(self, offset: i64) -> Self::Output where
Self: OffsetDsl,
fn offset(self, offset: i64) -> Self::Output where
Self: OffsetDsl,
Sets the offset clause of the query. Read more
fn for_update(self) -> Self::Output where
Self: ForUpdateDsl,
fn for_update(self) -> Self::Output where
Self: ForUpdateDsl,
Adds FOR UPDATE
to the end of the select statement. Read more
fn for_no_key_update(self) -> Self::Output where
Self: LockingDsl<ForNoKeyUpdate>,
fn for_no_key_update(self) -> Self::Output where
Self: LockingDsl<ForNoKeyUpdate>,
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
fn skip_locked(self) -> Self::Output where
Self: ModifyLockDsl<SkipLocked>,
fn skip_locked(self) -> Self::Output where
Self: ModifyLockDsl<SkipLocked>,
Adds SKIP LOCKED
to the end of a FOR UPDATE
clause. Read more
fn no_wait(self) -> Self::Output where
Self: ModifyLockDsl<NoWait>,
fn no_wait(self) -> Self::Output where
Self: ModifyLockDsl<NoWait>,
Adds NOWAIT
to the end of a FOR UPDATE
clause. Read more
fn into_boxed<'a, DB>(self) -> Self::Output where
DB: Backend,
Self: BoxedDsl<'a, DB>,
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
fn single_value(self) -> Self::Output where
Self: SingleValueDsl,
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
impl<T> JoinOnDsl for T where
T: QuerySource,
impl<T> JoinOnDsl for T where
T: QuerySource,
fn on<On>(self, on: On) -> OnClauseWrapper<Self, On>
fn on<On>(self, on: On) -> OnClauseWrapper<Self, On>
See the trait documentation.
impl<T> Erased for T
impl<T> Erased for T