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
Trait Implementations
sourceimpl AppearsInFromClause<table> for ()
impl AppearsInFromClause<table> for ()
type Count = Never
type Count = Never
How many times does
Self
appear in QS
?sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Once
type Count = Once
How many times does
Self
appear in QS
?sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
type Count = Never
How many times does
Self
appear in QS
?sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
type Count = Never
How many times does
Self
appear in QS
?sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
type Count = Never
How many times does
Self
appear in QS
?sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
type Count = Never
How many times does
Self
appear in QS
?sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
type Count = Never
How many times does
Self
appear in QS
?sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
type Count = Never
How many times does
Self
appear in QS
?sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
type Count = Never
How many times does
Self
appear in QS
?sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
type Count = Never
How many times does
Self
appear in QS
?sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
type Count = Never
How many times does
Self
appear in QS
?sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
type Count = Never
How many times does
Self
appear in QS
?sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
type Count = Never
How many times does
Self
appear in QS
?sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
type Count = Never
type Count = Never
How many times does
Self
appear in QS
?sourceimpl AsQuery for table
impl AsQuery for table
type SqlType = (Integer, Text, Text, Nullable<Text>, Binary)
type SqlType = (Integer, Text, Text, Nullable<Text>, Binary)
The SQL type of
Self::Query
sourceimpl<'a, T> Insertable<T> for &'a tablewhere
table: Insertable<T>,
impl<'a, T> Insertable<T> for &'a tablewhere
table: Insertable<T>,
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 moresourceimpl<T> Insertable<T> for tablewhere
<table as AsQuery>::Query: Insertable<T>,
impl<T> Insertable<T> for tablewhere
<table as AsQuery>::Query: Insertable<T>,
type Values = <<table as AsQuery>::Query as Insertable<T>>::Values
type Values = <<table as AsQuery>::Query as Insertable<T>>::Values
The
VALUES
clause to insert these records Read morefn 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 moresourceimpl<'insert> Insertable<table> for &'insert NewUser
impl<'insert> Insertable<table> for &'insert NewUser
type Values = <(Option<Eq<login, <&'insert String as AsExpression<<login as Expression>::SqlType>>::Expression>>, Option<Eq<name, <&'insert String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Option<Eq<email, <&'insert String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Option<Eq<pwhash, <&'insert Vec<u8, Global> as AsExpression<<pwhash as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values
type Values = <(Option<Eq<login, <&'insert String as AsExpression<<login as Expression>::SqlType>>::Expression>>, Option<Eq<name, <&'insert String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Option<Eq<email, <&'insert String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Option<Eq<pwhash, <&'insert Vec<u8, Global> as AsExpression<<pwhash as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values
The
VALUES
clause to insert these records Read morefn 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 moresourceimpl<'insert> Insertable<table> for NewUser
impl<'insert> Insertable<table> for NewUser
type Values = <(Option<Eq<login, <String as AsExpression<<login as Expression>::SqlType>>::Expression>>, Option<Eq<name, <String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Option<Eq<email, <String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Option<Eq<pwhash, <Vec<u8, Global> as AsExpression<<pwhash as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values
type Values = <(Option<Eq<login, <String as AsExpression<<login as Expression>::SqlType>>::Expression>>, Option<Eq<name, <String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Option<Eq<email, <String as AsExpression<<email as Expression>::SqlType>>::Expression>>, Option<Eq<pwhash, <Vec<u8, Global> as AsExpression<<pwhash as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values
The
VALUES
clause to insert these records Read morefn 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 moresourceimpl IntoUpdateTarget for table
impl IntoUpdateTarget for table
type WhereClause = <<table as AsQuery>::Query as IntoUpdateTarget>::WhereClause
type WhereClause = <<table as AsQuery>::Query as IntoUpdateTarget>::WhereClause
What is the
WHERE
clause of this target?sourcefn into_update_target(self) -> UpdateTarget<Self::Table, Self::WhereClause>
fn into_update_target(self) -> UpdateTarget<Self::Table, Self::WhereClause>
Decomposes
self
into the table and where clause.sourceimpl QueryId for table
impl QueryId for table
sourceconst HAS_STATIC_QUERY_ID: bool = true
const HAS_STATIC_QUERY_ID: bool = true
Can the SQL generated by
Self
be uniquely identified by its type? Read moresourceimpl QuerySource for table
impl QuerySource for table
type FromClause = Identifier<'static>
type FromClause = Identifier<'static>
The type returned by
from_clause
type DefaultSelection = <table as Table>::AllColumns
type DefaultSelection = <table as Table>::AllColumns
The type returned by
default_selection
sourcefn from_clause(&self) -> Self::FromClause
fn from_clause(&self) -> Self::FromClause
The actual
FROM
clause of this type. This is typically only called in
QueryFragment
implementations. Read moresourcefn default_selection(&self) -> Self::DefaultSelection
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
Read moresourceimpl Table for table
impl Table for table
type PrimaryKey = id
type PrimaryKey = id
The type returned by
primary_key
sourcefn primary_key(&self) -> Self::PrimaryKey
fn primary_key(&self) -> Self::PrimaryKey
Returns the primary key of this table. Read more
sourcefn all_columns() -> Self::AllColumns
fn all_columns() -> Self::AllColumns
Returns a tuple of all columns belonging to this table.
impl AppearsOnTable<table> for star
impl Copy for table
impl<'a, QS, ST, DB> JoinTo<BoxedSelectStatement<'a, QS, ST, DB>> for tablewhere
BoxedSelectStatement<'a, QS, ST, DB>: JoinTo<table>,
impl<Left, Right, Kind> JoinTo<Join<Left, Right, Kind>> for tablewhere
Join<Left, Right, Kind>: JoinTo<table>,
impl SelectableExpression<table> for email
impl SelectableExpression<table> for id
impl SelectableExpression<table> for login
impl SelectableExpression<table> for name
impl SelectableExpression<table> for pwhash
impl SelectableExpression<table> for star
impl<'insert> UndecoratedInsertRecord<table> for NewUser
Auto Trait Implementations
impl RefUnwindSafe for table
impl Send for table
impl Sync for table
impl Unpin for table
impl UnwindSafe for table
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ForUpdateDsl for Twhere
T: LockingDsl<ForUpdate>,
impl<T> ForUpdateDsl for Twhere
T: LockingDsl<ForUpdate>,
type Output = <T as LockingDsl<ForUpdate>>::Output
type Output = <T as LockingDsl<ForUpdate>>::Output
👎Deprecated since 1.3.0:
use LockingDsl<ForUpdate>
instead
fn for_update(self) -> <T as ForUpdateDsl>::Output
fn for_update(self) -> <T as ForUpdateDsl>::Output
👎Deprecated since 1.3.0:
use LockingDsl<ForUpdate>
instead
See the trait level documentation
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
Converts
self
into a collection.fn mapped<U, F, A>(self, f: F) -> SmallVec<A>where
F: FnMut(T) -> U,
A: Array<Item = U>,
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
impl<T> IntoSql for T
impl<T> IntoSql for T
impl<T> JoinOnDsl for Twhere
T: QuerySource,
impl<T> JoinOnDsl for Twhere
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<Lhs, Rhs, On> JoinTo<OnClauseWrapper<Rhs, On>> for Lhswhere
Lhs: Table,
impl<Lhs, Rhs, On> JoinTo<OnClauseWrapper<Rhs, On>> for Lhswhere
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)
impl<T> QueryDsl for Twhere
T: Table,
impl<T> QueryDsl for Twhere
T: Table,
fn distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
Adds the
DISTINCT
keyword to a query. Read morefn distinct_on<Expr>(self, expr: Expr) -> Self::Outputwhere
Self: DistinctOnDsl<Expr>,
fn distinct_on<Expr>(self, expr: Expr) -> Self::Outputwhere
Self: DistinctOnDsl<Expr>,
Adds the
DISTINCT ON
clause to a query. Read morefn select<Selection>(self, selection: Selection) -> Self::Outputwhere
Selection: Expression,
Self: SelectDsl<Selection>,
fn select<Selection>(self, selection: Selection) -> Self::Outputwhere
Selection: Expression,
Self: SelectDsl<Selection>,
Adds a
SELECT
clause to the query. Read morefn count(self) -> Self::Outputwhere
Self: SelectDsl<CountStar>,
fn count(self) -> Self::Outputwhere
Self: SelectDsl<CountStar>,
Get the count of a query. This is equivalent to
.select(count_star())
Read morefn inner_join<Rhs>(self, rhs: Rhs) -> Self::Outputwhere
Self: JoinWithImplicitOnClause<Rhs, Inner>,
fn inner_join<Rhs>(self, rhs: Rhs) -> Self::Outputwhere
Self: JoinWithImplicitOnClause<Rhs, Inner>,
Join two tables using a SQL
INNER JOIN
. Read morefn left_outer_join<Rhs>(self, rhs: Rhs) -> Self::Outputwhere
Self: JoinWithImplicitOnClause<Rhs, LeftOuter>,
fn left_outer_join<Rhs>(self, rhs: Rhs) -> Self::Outputwhere
Self: JoinWithImplicitOnClause<Rhs, LeftOuter>,
Join two tables using a SQL
LEFT OUTER JOIN
. Read morefn left_join<Rhs>(self, rhs: Rhs) -> Self::Outputwhere
Self: JoinWithImplicitOnClause<Rhs, LeftOuter>,
fn left_join<Rhs>(self, rhs: Rhs) -> Self::Outputwhere
Self: JoinWithImplicitOnClause<Rhs, LeftOuter>,
Alias for
left_outer_join
. Read morefn filter<Predicate>(self, predicate: Predicate) -> Self::Outputwhere
Self: FilterDsl<Predicate>,
fn filter<Predicate>(self, predicate: Predicate) -> Self::Outputwhere
Self: FilterDsl<Predicate>,
Adds to the
WHERE
clause of a query. Read morefn or_filter<Predicate>(self, predicate: Predicate) -> Self::Outputwhere
Self: OrFilterDsl<Predicate>,
fn or_filter<Predicate>(self, predicate: Predicate) -> Self::Outputwhere
Self: OrFilterDsl<Predicate>,
fn find<PK>(self, id: PK) -> Self::Outputwhere
Self: FindDsl<PK>,
fn find<PK>(self, id: PK) -> Self::Outputwhere
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::Outputwhere
Expr: Expression,
Self: OrderDsl<Expr>,
fn order<Expr>(self, expr: Expr) -> Self::Outputwhere
Expr: Expression,
Self: OrderDsl<Expr>,
Sets the order clause of a query. Read more
fn order_by<Expr>(self, expr: Expr) -> Self::Outputwhere
Expr: Expression,
Self: OrderDsl<Expr>,
fn order_by<Expr>(self, expr: Expr) -> Self::Outputwhere
Expr: Expression,
Self: OrderDsl<Expr>,
Alias for
order
fn then_order_by<Order>(self, order: Order) -> Self::Outputwhere
Self: ThenOrderDsl<Order>,
fn then_order_by<Order>(self, order: Order) -> Self::Outputwhere
Self: ThenOrderDsl<Order>,
Appends to the
ORDER BY
clause of this SQL query. Read morefn limit(self, limit: i64) -> Self::Outputwhere
Self: LimitDsl,
fn limit(self, limit: i64) -> Self::Outputwhere
Self: LimitDsl,
Sets the limit clause of the query. Read more
fn offset(self, offset: i64) -> Self::Outputwhere
Self: OffsetDsl,
fn offset(self, offset: i64) -> Self::Outputwhere
Self: OffsetDsl,
Sets the offset clause of the query. Read more
fn for_update(self) -> Self::Outputwhere
Self: ForUpdateDsl,
fn for_update(self) -> Self::Outputwhere
Self: ForUpdateDsl,
Adds
FOR UPDATE
to the end of the select statement. Read morefn for_no_key_update(self) -> Self::Outputwhere
Self: LockingDsl<ForNoKeyUpdate>,
fn for_no_key_update(self) -> Self::Outputwhere
Self: LockingDsl<ForNoKeyUpdate>,
Adds
FOR NO KEY UPDATE
to the end of the select statement. Read moreAdds
FOR SHARE
to the end of the select statement. Read moreAdds
FOR KEY SHARE
to the end of the select statement. Read morefn skip_locked(self) -> Self::Outputwhere
Self: ModifyLockDsl<SkipLocked>,
fn skip_locked(self) -> Self::Outputwhere
Self: ModifyLockDsl<SkipLocked>,
fn no_wait(self) -> Self::Outputwhere
Self: ModifyLockDsl<NoWait>,
fn no_wait(self) -> Self::Outputwhere
Self: ModifyLockDsl<NoWait>,
fn into_boxed<'a, DB>(self) -> Self::Outputwhere
DB: Backend,
Self: BoxedDsl<'a, DB>,
fn into_boxed<'a, DB>(self) -> Self::Outputwhere
DB: Backend,
Self: BoxedDsl<'a, DB>,
Boxes the pieces of a query into a single type. Read more
fn single_value(self) -> Self::Outputwhere
Self: SingleValueDsl,
fn single_value(self) -> Self::Outputwhere
Self: SingleValueDsl,
Wraps this select statement in parenthesis, allowing it to be used
as an expression. Read more
impl<T, Conn> RunQueryDsl<Conn> for Twhere
T: Table,
impl<T, Conn> RunQueryDsl<Conn> for Twhere
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, Global>, Error>where
Self: LoadQuery<Conn, U>,
fn load<U>(self, conn: &Conn) -> Result<Vec<U, Global>, Error>where
Self: LoadQuery<Conn, U>,
Executes the given query, returning a
Vec
with the returned rows. Read morefn 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