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§

source§

impl table

source

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§

source§

impl AppearsInFromClause<table> for ()

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Once

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
source§

impl AsQuery for table

§

type SqlType = (Integer, Integer, Integer, Nullable<Text>)

The SQL type of Self::Query
§

type Query = SelectStatement<table, DefaultSelectClause, NoDistinctClause, NoWhereClause, NoOrderClause, NoLimitClause, NoOffsetClause, NoGroupByClause, NoLockingClause>

What kind of query does this type represent?
source§

fn as_query(self) -> Self::Query

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

impl Clone for table

source§

fn clone(&self) -> table

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for table

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl HasTable for table

§

type Table = table

The table this type is associated with.
source§

fn table() -> Self::Table

Returns the table this type is associated with.
source§

impl<'a, T> Insertable<T> for &'a tablewhere table: Insertable<T>,

§

type Values = <table as Insertable<T>>::Values

The VALUES clause to insert these records Read more
source§

fn values(self) -> Self::Values

Construct Self::Values Read more
source§

fn insert_into( self, table: T ) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>where Self: Sized,

Insert self into a given table. Read more
source§

impl<T> Insertable<T> for tablewhere <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
source§

fn values(self) -> Self::Values

Construct Self::Values Read more
source§

fn insert_into( self, table: T ) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>where Self: Sized,

Insert self into a given table. Read more
source§

impl<'insert> Insertable<table> for &'insert NewBreachEmail

§

type Values = <(Option<Eq<breach_id, <&'insert i32 as AsExpression<<breach_id as Expression>::SqlType>>::Expression>>, Option<Eq<email_id, <&'insert i32 as AsExpression<<email_id as Expression>::SqlType>>::Expression>>, Option<Eq<password, <&'insert String as AsExpression<<password as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
source§

fn values(self) -> Self::Values

Construct Self::Values Read more
source§

fn insert_into( self, table: T ) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>where Self: Sized,

Insert self into a given table. Read more
source§

impl<'insert> Insertable<table> for NewBreachEmail

§

type Values = <(Option<Eq<breach_id, <i32 as AsExpression<<breach_id as Expression>::SqlType>>::Expression>>, Option<Eq<email_id, <i32 as AsExpression<<email_id as Expression>::SqlType>>::Expression>>, Option<Eq<password, <String as AsExpression<<password as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
source§

fn values(self) -> Self::Values

Construct Self::Values Read more
source§

fn insert_into( self, table: T ) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>where Self: Sized,

Insert self into a given table. Read more
source§

impl IntoUpdateTarget for table

§

type WhereClause = <<table as AsQuery>::Query as IntoUpdateTarget>::WhereClause

What is the WHERE clause of this target?
source§

fn into_update_target(self) -> UpdateTarget<Self::Table, Self::WhereClause>

Decomposes self into the table and where clause.
source§

impl QueryId for table

§

type QueryId = table

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

const HAS_STATIC_QUERY_ID: bool = true

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

fn query_id() -> Option<TypeId>

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

impl QuerySource for table

§

type FromClause = Identifier<'static>

The type returned by from_clause
§

type DefaultSelection = <table as Table>::AllColumns

The type returned by default_selection
source§

fn from_clause(&self) -> Self::FromClause

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

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
source§

impl Table for table

§

type PrimaryKey = id

The type returned by primary_key
§

type AllColumns = (id, breach_id, email_id, password)

The type returned by all_columns
source§

fn primary_key(&self) -> Self::PrimaryKey

Returns the primary key of this table. Read more
source§

fn all_columns() -> Self::AllColumns

Returns a tuple of all columns belonging to this table.
source§

impl AppearsOnTable<table> for star

source§

impl Copy for table

source§

impl<'a, QS, ST, DB> JoinTo<BoxedSelectStatement<'a, QS, ST, DB>> for tablewhere BoxedSelectStatement<'a, QS, ST, DB>: JoinTo<table>,

source§

impl<Left, Right, Kind> JoinTo<Join<Left, Right, Kind>> for tablewhere Join<Left, Right, Kind>: JoinTo<table>,

source§

impl JoinTo<table> for table

source§

impl JoinTo<table> for table

source§

impl JoinTo<table> for table

source§

impl JoinTo<table> for table

source§

impl SelectableExpression<table> for breach_id

source§

impl SelectableExpression<table> for email_id

source§

impl SelectableExpression<table> for id

source§

impl SelectableExpression<table> for password

source§

impl SelectableExpression<table> for star

source§

impl<'insert> UndecoratedInsertRecord<table> for NewBreachEmail

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§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T> AsTaggedExplicit<'a> for Twhere T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self>

§

impl<'a, T> AsTaggedImplicit<'a> for Twhere T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self>

source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DistinctDsl for Twhere T: Table, <T as AsQuery>::Query: DistinctDsl,

§

type Output = <<T as AsQuery>::Query as DistinctDsl>::Output

The type returned by .distinct
source§

fn distinct(self) -> <T as DistinctDsl>::Output

See the trait documentation.
source§

impl<T> ForUpdateDsl for Twhere T: LockingDsl<ForUpdate>,

§

type Output = <T as LockingDsl<ForUpdate>>::Output

👎Deprecated since 1.3.0: use LockingDsl<ForUpdate> instead
The type returned by for_update. See dsl::ForUpdate for convenient access to this type.
source§

fn for_update(self) -> <T as ForUpdateDsl>::Output

👎Deprecated since 1.3.0: use LockingDsl<ForUpdate> instead
See the trait level documentation
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> IntoSql for T

source§

fn into_sql<T>(self) -> Self::Expressionwhere Self: AsExpression<T> + Sized,

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

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere &'a Self: AsExpression<T>,

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

impl<T> JoinOnDsl for Twhere T: QuerySource,

source§

fn on<On>(self, on: On) -> OnClauseWrapper<Self, On>

See the trait documentation.
source§

impl<Lhs, Rhs, On> JoinTo<OnClauseWrapper<Rhs, On>> for Lhswhere Lhs: Table,

§

type FromClause = Rhs

§

type OnClause = On

source§

fn join_target( rhs: OnClauseWrapper<Rhs, On> ) -> (<Lhs as JoinTo<OnClauseWrapper<Rhs, On>>>::FromClause, <Lhs as JoinTo<OnClauseWrapper<Rhs, On>>>::OnClause)

source§

impl<T> LimitDsl for Twhere T: Table, <T as AsQuery>::Query: LimitDsl,

§

type Output = <<T as AsQuery>::Query as LimitDsl>::Output

The type returned by .limit
source§

fn limit(self, limit: i64) -> <T as LimitDsl>::Output

See the trait documentation
source§

impl<T> OffsetDsl for Twhere T: Table, <T as AsQuery>::Query: OffsetDsl,

§

type Output = <<T as AsQuery>::Query as OffsetDsl>::Output

The type returned by .offset.
source§

fn offset(self, offset: i64) -> <T as OffsetDsl>::Output

See the trait documentation
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> QueryDsl for Twhere T: Table,

source§

fn distinct(self) -> Self::Outputwhere Self: DistinctDsl,

Adds the DISTINCT keyword to a query. Read more
source§

fn select<Selection>(self, selection: Selection) -> Self::Outputwhere Selection: Expression, Self: SelectDsl<Selection>,

Adds a SELECT clause to the query. Read more
source§

fn count(self) -> Self::Outputwhere Self: SelectDsl<CountStar>,

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

fn inner_join<Rhs>(self, rhs: Rhs) -> Self::Outputwhere Self: JoinWithImplicitOnClause<Rhs, Inner>,

Join two tables using a SQL INNER JOIN. Read more
source§

fn left_outer_join<Rhs>(self, rhs: Rhs) -> Self::Outputwhere Self: JoinWithImplicitOnClause<Rhs, LeftOuter>,

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

fn left_join<Rhs>(self, rhs: Rhs) -> Self::Outputwhere Self: JoinWithImplicitOnClause<Rhs, LeftOuter>,

Alias for left_outer_join.
source§

fn filter<Predicate>(self, predicate: Predicate) -> Self::Outputwhere Self: FilterDsl<Predicate>,

Adds to the WHERE clause of a query. Read more
source§

fn or_filter<Predicate>(self, predicate: Predicate) -> Self::Outputwhere Self: OrFilterDsl<Predicate>,

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

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
source§

fn order<Expr>(self, expr: Expr) -> Self::Outputwhere Expr: Expression, Self: OrderDsl<Expr>,

Sets the order clause of a query. Read more
source§

fn order_by<Expr>(self, expr: Expr) -> Self::Outputwhere Expr: Expression, Self: OrderDsl<Expr>,

Alias for order
source§

fn then_order_by<Order>(self, order: Order) -> Self::Outputwhere Self: ThenOrderDsl<Order>,

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

fn limit(self, limit: i64) -> Self::Outputwhere Self: LimitDsl,

Sets the limit clause of the query. Read more
source§

fn offset(self, offset: i64) -> Self::Outputwhere Self: OffsetDsl,

Sets the offset clause of the query. Read more
source§

fn for_update(self) -> Self::Outputwhere Self: ForUpdateDsl,

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

fn for_no_key_update(self) -> Self::Outputwhere Self: LockingDsl<ForNoKeyUpdate>,

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

fn for_share(self) -> Self::Outputwhere Self: LockingDsl<ForShare>,

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

fn for_key_share(self) -> Self::Outputwhere Self: LockingDsl<ForKeyShare>,

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

fn skip_locked(self) -> Self::Outputwhere Self: ModifyLockDsl<SkipLocked>,

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

fn no_wait(self) -> Self::Outputwhere Self: ModifyLockDsl<NoWait>,

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

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
source§

fn single_value(self) -> Self::Outputwhere Self: SingleValueDsl,

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

fn nullable(self) -> Self::Outputwhere Self: SelectNullableDsl,

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

impl<T, Conn> RunQueryDsl<Conn> for Twhere T: Table,

source§

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
source§

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
source§

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
source§

fn get_results<U>(self, conn: &Conn) -> Result<Vec<U, Global>, Error>where Self: LoadQuery<Conn, U>,

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

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
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<G1, G2> Within<G2> for G1where G2: Contains<G1>,

§

fn is_within(&self, b: &G2) -> bool