Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Struct leetcode_cli::cache::schemas::problems::table[][src]

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

impl table[src]

pub fn star(&self) -> star[src]

Represents table_name.*, which is sometimes necessary for efficient count queries. It cannot be used in place of all_columns

Trait Implementations

impl AppearsInFromClause<table> for table[src]

type Count = Once

How many times does Self appear in QS?

impl AsQuery for table[src]

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[src]

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

impl Clone for table[src]

fn clone(&self) -> table[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for table[src]

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

Formats the value using the given formatter. Read more

impl HasTable for table[src]

type Table = Self

The table this type is associated with.

fn table() -> Self::Table[src]

Returns the table this type is associated with.

impl<T> Insertable<T> for table where
    <table as AsQuery>::Query: Insertable<T>, 
[src]

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

The VALUES clause to insert these records Read more

fn values(self) -> Self::Values[src]

Construct Self::Values Read more

fn insert_into(
    self,
    table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
[src]

Insert self into a given table. Read more

impl<'a, T> Insertable<T> for &'a table where
    table: Insertable<T>, 
[src]

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

The VALUES clause to insert these records Read more

fn values(self) -> Self::Values[src]

Construct Self::Values Read more

fn insert_into(
    self,
    table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
[src]

Insert self into a given table. Read more

impl<'insert> Insertable<table> for Problem[src]

type Values = <(Option<Eq<category, String>>, Option<Eq<fid, i32>>, Option<Eq<id, i32>>, Option<Eq<level, i32>>, Option<Eq<locked, bool>>, Option<Eq<name, String>>, Option<Eq<percent, f32>>, Option<Eq<slug, String>>, Option<Eq<starred, bool>>, Option<Eq<status, String>>, Option<Eq<desc, String>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more

fn values(self) -> Self::Values[src]

Construct Self::Values Read more

fn insert_into(
    self,
    table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
[src]

Insert self into a given table. Read more

impl<'insert> Insertable<table> for &'insert Problem[src]

type Values = <(Option<Eq<category, &'insert String>>, Option<Eq<fid, &'insert i32>>, Option<Eq<id, &'insert i32>>, Option<Eq<level, &'insert i32>>, Option<Eq<locked, &'insert bool>>, Option<Eq<name, &'insert String>>, Option<Eq<percent, &'insert f32>>, Option<Eq<slug, &'insert String>>, Option<Eq<starred, &'insert bool>>, Option<Eq<status, &'insert String>>, Option<Eq<desc, &'insert String>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more

fn values(self) -> Self::Values[src]

Construct Self::Values Read more

fn insert_into(
    self,
    table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
[src]

Insert self into a given table. Read more

impl IntoUpdateTarget for table[src]

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>[src]

Decomposes self into the table and where clause.

impl<'a, QS, ST, DB> JoinTo<BoxedSelectStatement<'a, QS, ST, DB>> for table where
    BoxedSelectStatement<'a, QS, ST, DB>: JoinTo<table>, 
[src]

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)
[src]

impl<Left, Right, Kind> JoinTo<Join<Left, Right, Kind>> for table where
    Join<Left, Right, Kind>: JoinTo<table>, 
[src]

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)
[src]

impl<Join, On> JoinTo<JoinOn<Join, On>> for table where
    JoinOn<Join, On>: JoinTo<table>, 
[src]

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)[src]

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>, 
[src]

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)
[src]

impl QueryId for table[src]

type QueryId = table

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

const HAS_STATIC_QUERY_ID: bool[src]

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

fn query_id() -> Option<TypeId>[src]

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

impl QuerySource for table[src]

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[src]

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

fn default_selection(&self) -> Self::DefaultSelection[src]

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 Table for table[src]

type PrimaryKey = id

The type returned by primary_key

type AllColumns = (category, fid, id, level, locked, name, percent, slug, starred, status, desc)

The type returned by all_columns

fn primary_key(&self) -> Self::PrimaryKey[src]

Returns the primary key of this table. Read more

fn all_columns() -> Self::AllColumns[src]

Returns a tuple of all columns belonging to this table.

impl AppearsOnTable<table> for star[src]

impl Copy for table[src]

impl SelectableExpression<table> for star[src]

impl SelectableExpression<table> for category[src]

impl SelectableExpression<table> for status[src]

impl SelectableExpression<table> for desc[src]

impl SelectableExpression<table> for fid[src]

impl SelectableExpression<table> for id[src]

impl SelectableExpression<table> for level[src]

impl SelectableExpression<table> for locked[src]

impl SelectableExpression<table> for name[src]

impl SelectableExpression<table> for percent[src]

impl SelectableExpression<table> for slug[src]

impl SelectableExpression<table> for starred[src]

impl<'insert> UndecoratedInsertRecord<table> for Problem[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> ForUpdateDsl for T where
    T: LockingDsl<ForUpdate>, 
[src]

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. Read more

pub fn for_update(self) -> <T as ForUpdateDsl>::Output[src]

👎 Deprecated since 1.3.0:

use LockingDsl<ForUpdate> instead

See the trait level documentation

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> IntoSql for T[src]

fn into_sql<T>(self) -> Self::Expression where
    Self: AsExpression<T>, 
[src]

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>, 
[src]

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

impl<T> JoinOnDsl for T where
    T: QuerySource
[src]

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

See the trait documentation.

impl<Lhs, Rhs, On> JoinTo<OnClauseWrapper<Rhs, On>> for Lhs where
    Lhs: Table
[src]

type FromClause = Rhs

type OnClause = On

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

impl<T> QueryDsl for T where
    T: Table
[src]

fn distinct(self) -> Self::Output where
    Self: DistinctDsl
[src]

Adds the DISTINCT keyword to a query. Read more

fn select<Selection>(self, selection: Selection) -> Self::Output where
    Self: SelectDsl<Selection>,
    Selection: Expression
[src]

Adds a SELECT clause to the query. Read more

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
    Self: OrderDsl<Expr>,
    Expr: Expression
[src]

Sets the order clause of a query. Read more

fn order_by<Expr>(self, expr: Expr) -> Self::Output where
    Self: OrderDsl<Expr>,
    Expr: Expression
[src]

Alias for order

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

fn for_update(self) -> Self::Output where
    Self: ForUpdateDsl
[src]

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

fn for_no_key_update(self) -> Self::Output where
    Self: LockingDsl<ForNoKeyUpdate>, 
[src]

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

fn for_key_share(self) -> Self::Output where
    Self: LockingDsl<ForKeyShare>, 
[src]

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

fn into_boxed<'a, DB>(self) -> Self::Output where
    Self: BoxedDsl<'a, DB>,
    DB: Backend
[src]

Boxes the pieces of a query into a single type. Read more

fn single_value(self) -> Self::Output where
    Self: SingleValueDsl
[src]

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

fn nullable(self) -> Self::Output where
    Self: SelectNullableDsl
[src]

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

impl<T, Conn> RunQueryDsl<Conn> for T where
    T: Table
[src]

fn execute(self, conn: &Conn) -> Result<usize, Error> where
    Self: ExecuteDsl<Conn, <Conn as Connection>::Backend>,
    Conn: Connection
[src]

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>, 
[src]

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>, 
[src]

Runs the command, and returns the affected row. Read more

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

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]

Attempts to load a single record. Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

pub fn vzip(self) -> V