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 table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for ()
impl AppearsInFromClause<table> for ()
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AppearsInFromClause<table> for table
impl AppearsInFromClause<table> for table
sourceimpl AsQuery for table
impl AsQuery for table
type Query = SelectStatement<Self>
type Query = SelectStatement<Self>
What kind of query does this type represent?
sourceimpl<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
type Values = <<table as AsQuery>::Query as Insertable<T>>::Values
The VALUES
clause to insert these records Read more
sourcefn 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
sourceimpl<'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
type Values = <table as Insertable<T>>::Values
The VALUES
clause to insert these records Read more
sourcefn 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
sourceimpl<'insert> Insertable<table> for NewNetworkDevice
impl<'insert> Insertable<table> for NewNetworkDevice
type Values = <(Option<Eq<network_id, i32>>, Option<Eq<device_id, i32>>, Option<Eq<ipaddr, String>>, Option<Eq<last_seen, NaiveDateTime>>) as Insertable<table>>::Values
type Values = <(Option<Eq<network_id, i32>>, Option<Eq<device_id, i32>>, Option<Eq<ipaddr, String>>, Option<Eq<last_seen, NaiveDateTime>>) as Insertable<table>>::Values
The VALUES
clause to insert these records Read more
sourcefn 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
sourceimpl<'insert> Insertable<table> for &'insert NewNetworkDevice
impl<'insert> Insertable<table> for &'insert NewNetworkDevice
type Values = <(Option<Eq<network_id, &'insert i32>>, Option<Eq<device_id, &'insert i32>>, Option<Eq<ipaddr, &'insert String>>, Option<Eq<last_seen, &'insert NaiveDateTime>>) as Insertable<table>>::Values
type Values = <(Option<Eq<network_id, &'insert i32>>, Option<Eq<device_id, &'insert i32>>, Option<Eq<ipaddr, &'insert String>>, Option<Eq<last_seen, &'insert NaiveDateTime>>) as Insertable<table>>::Values
The VALUES
clause to insert these records Read more
sourcefn 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
sourceimpl IntoUpdateTarget for table
impl IntoUpdateTarget for table
type WhereClause = <<Self as AsQuery>::Query as IntoUpdateTarget>::WhereClause
type WhereClause = <<Self 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
const HAS_STATIC_QUERY_ID: bool
Can the SQL generated by Self
be uniquely identified by its type? Read more
sourceimpl QuerySource for table
impl QuerySource for table
type FromClause = Identifier<'static>
type FromClause = Identifier<'static>
The type returned by from_clause
type DefaultSelection = <Self as Table>::AllColumns
type DefaultSelection = <Self 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 more
sourcefn 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 more
sourceimpl Table for table
impl Table for table
type PrimaryKey = id
type PrimaryKey = id
The type returned by primary_key
type AllColumns = (id, network_id, device_id, ipaddr, last_seen)
type AllColumns = (id, network_id, device_id, ipaddr, last_seen)
The type returned by all_columns
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 table where
BoxedSelectStatement<'a, QS, ST, DB>: JoinTo<table>,
impl<Left, Right, Kind> JoinTo<Join<Left, Right, Kind>> for table where
Join<Left, Right, Kind>: JoinTo<table>,
impl JoinTo<table> for table
impl JoinTo<table> for table
impl JoinTo<table> for table
impl JoinTo<table> for table
impl SelectableExpression<table> for star
impl SelectableExpression<table> for id
impl SelectableExpression<table> for network_id
impl SelectableExpression<table> for device_id
impl SelectableExpression<table> for ipaddr
impl SelectableExpression<table> for last_seen
impl<'insert> UndecoratedInsertRecord<table> for NewNetworkDevice
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ForUpdateDsl for T where
T: LockingDsl<ForUpdate>,
impl<T> ForUpdateDsl for T where
T: LockingDsl<ForUpdate>,
type Output = <T as LockingDsl<ForUpdate>>::Output
type Output = <T as LockingDsl<ForUpdate>>::Output
use LockingDsl<ForUpdate>
instead
The type returned by for_update
. See dsl::ForUpdate
for
convenient access to this type. Read more
sourcefn for_update(self) -> <T as ForUpdateDsl>::Output
fn for_update(self) -> <T as ForUpdateDsl>::Output
use LockingDsl<ForUpdate>
instead
See the trait level documentation
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourcefn 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
sourcefn 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
sourceimpl<T> JoinOnDsl for T where
T: QuerySource,
impl<T> JoinOnDsl for T where
T: QuerySource,
sourceimpl<Lhs, Rhs, On> JoinTo<OnClauseWrapper<Rhs, On>> for Lhs where
Lhs: Table,
impl<Lhs, Rhs, On> JoinTo<OnClauseWrapper<Rhs, On>> 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)
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> QueryDsl for T where
T: Table,
impl<T> QueryDsl for T where
T: Table,
sourcefn distinct(self) -> Self::Output where
Self: DistinctDsl,
fn distinct(self) -> Self::Output where
Self: DistinctDsl,
Adds the DISTINCT
keyword to a query. Read more
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn nullable(self) -> Self::Output where
Self: SelectNullableDsl,
fn nullable(self) -> Self::Output where
Self: SelectNullableDsl,
Coerce the SQL type of the select clause to it’s nullable equivalent. Read more
sourceimpl<T, Conn> RunQueryDsl<Conn> for T where
T: Table,
impl<T, Conn> RunQueryDsl<Conn> for T where
T: Table,
sourcefn 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
sourcefn 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 more
sourcefn 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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more