teacherapi::schema::teacher_rating

Struct table

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

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 AppearsInFromClause<table> for ()

§

type Count = Never

How many times does Self appear in QS?
§

impl AppearsInFromClause<table> for table

§

type Count = Once

How many times does Self appear in QS?
§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
§

impl AppearsInFromClause<table> for table

§

type Count = Never

How many times does Self appear in QS?
§

impl AsQuery for table

§

type SqlType = (Nullable<Timestamp>, Nullable<Integer>, Uuid, Nullable<Uuid>, Uuid, Uuid, Nullable<Text>, Nullable<Uuid>, Nullable<Jsonb>)

The SQL type of Self::Query
§

type Query = SelectStatement<table>

What kind of query does this type represent?
§

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

impl Clone for table

§

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
§

impl Debug for table

§

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

Formats the value using the given formatter. Read more
§

impl HasTable for table

§

type Table = table

The table this type is associated with.
§

fn table() -> Self::Table

Returns the table this type is associated with.
§

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

Construct Self::Values Read more
Source§

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

Insert self into a given table. Read more
§

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

Construct Self::Values Read more
Source§

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

Insert self into a given table. Read more
§

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

§

type Values = <(Option<Eq<updt, <&'insert NaiveDateTime as AsExpression<<updt as Expression>::SqlType>>::Expression>>, Option<Eq<ver, <&'insert i32 as AsExpression<<ver as Expression>::SqlType>>::Expression>>, Option<Eq<uuid, <&'insert Uuid as AsExpression<<uuid as Expression>::SqlType>>::Expression>>, Option<Eq<updu, <&'insert Uuid as AsExpression<<updu as Expression>::SqlType>>::Expression>>, Option<Eq<user_id, <&'insert Uuid as AsExpression<<user_id as Expression>::SqlType>>::Expression>>, Option<Eq<teacher_id, <&'insert Uuid as AsExpression<<teacher_id as Expression>::SqlType>>::Expression>>, Option<Eq<rstatus, <&'insert RStatus as AsExpression<<rstatus as Expression>::SqlType>>::Expression>>, Option<Eq<lesson, <&'insert Uuid as AsExpression<<lesson as Expression>::SqlType>>::Expression>>, Option<Eq<ratings, <&'insert Json<Rating> as AsExpression<<ratings as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
§

fn values(self) -> Self::Values

Construct Self::Values Read more
Source§

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

Insert self into a given table. Read more
§

impl<'insert> Insertable<table> for TeacherRating

§

impl IntoUpdateTarget for table

§

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

What is the WHERE clause of this target?
§

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

Decomposes self into the table and where clause.
§

impl QueryId for table

§

const HAS_STATIC_QUERY_ID: bool = true

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

type QueryId = table

A type which uniquely represents Self in a SQL query. 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
§

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
§

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

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

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
§

impl Table for table

§

type PrimaryKey = uuid

The type returned by primary_key
§

type AllColumns = (updt, ver, uuid, updu, user_id, teacher_id, rstatus, lesson, ratings)

The type returned by all_columns
§

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

Returns the primary key of this table. Read more
§

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 SelectableExpression<table> for lesson

§

impl SelectableExpression<table> for ratings

§

impl SelectableExpression<table> for rstatus

§

impl SelectableExpression<table> for star

§

impl SelectableExpression<table> for teacher_id

§

impl SelectableExpression<table> for updt

§

impl SelectableExpression<table> for updu

§

impl SelectableExpression<table> for user_id

§

impl SelectableExpression<table> for uuid

§

impl SelectableExpression<table> for ver

§

impl<'insert> UndecoratedInsertRecord<table> for TeacherRating

Auto Trait Implementations§

§

impl Freeze for table

§

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 T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src
where Scheme: ApproxScheme,

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>

Convert the given value into an approximately equivalent representation.
Source§

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src
where Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,

Source§

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.
Source§

fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>

Convert the subject into an approximately equivalent representation.
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T, Dst> ConvAsUtil<Dst> for T

Source§

fn approx(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject with the default scheme.
Source§

fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject with a specific scheme.
Source§

impl<T> ConvUtil for T

Source§

fn approx_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject to a given type with the default scheme.
Source§

fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject to a given type with a specific scheme.
Source§

fn into_as<Dst>(self) -> Dst
where Self: Sized + Into<Dst>,

Convert the subject to a given type.
Source§

fn try_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + TryInto<Dst>,

Attempt to convert the subject to a given type.
Source§

fn value_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ValueInto<Dst>,

Attempt a value conversion of the subject to a given type.
Source§

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

Source§

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 T

Source§

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> Instrument for T

Source§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoSql for T

Source§

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

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>>::Expression
where &'a Self: AsExpression<T>,

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

impl<T> JoinOnDsl for T
where 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 Lhs
where Lhs: Table,

Source§

type FromClause = Rhs

Source§

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 T
where T: Table, <T as AsQuery>::Query: LimitDsl,

Source§

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 T
where T: Table, <T as AsQuery>::Query: OffsetDsl,

Source§

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

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

impl<T> QueryDsl for T
where T: Table,

Source§

fn distinct(self) -> Self::Output
where Self: DistinctDsl,

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

fn distinct_on<Expr>(self, expr: Expr) -> Self::Output
where Self: DistinctOnDsl<Expr>,

Adds the DISTINCT ON clause to a query. Read more
Source§

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

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

fn count(self) -> Self::Output
where 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::Output
where Self: JoinWithImplicitOnClause<Rhs, Inner>,

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

fn left_outer_join<Rhs>(self, rhs: Rhs) -> Self::Output

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

fn left_join<Rhs>(self, rhs: Rhs) -> Self::Output

Alias for left_outer_join.
Source§

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

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

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

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

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

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

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

Alias for order
Source§

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

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

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

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

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

fn for_update(self) -> Self::Output
where Self: ForUpdateDsl,

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

fn for_no_key_update(self) -> Self::Output

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

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

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

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

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

fn skip_locked(self) -> Self::Output

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

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

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

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

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

fn nullable(self) -> Self::Output
where Self: SelectNullableDsl,

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

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

Source§

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

Executes the given command, returning the number of rows affected. Read more
Source§

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
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>, 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 for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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<Src> TryFrom<Src> for Src

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>

Convert the given value into the subject type.
Source§

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

Source§

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<Src, Dst> TryInto<Dst> for Src
where Dst: TryFrom<Src>,

Source§

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.
Source§

fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>

Convert the subject into the destination type.
Source§

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

Source§

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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<Src> ValueFrom<Src> for Src

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>

Convert the given value into an exactly equivalent representation.
Source§

impl<Src, Dst> ValueInto<Dst> for Src
where Dst: ValueFrom<Src>,

Source§

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.
Source§

fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>

Convert the subject into an exactly equivalent representation.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T