securityapi::schema::resource

Type Alias BoxedQuery

pub type BoxedQuery<'a, DB, ST = (Uuid, Nullable<Timestamp>, Nullable<Uuid>, Nullable<Int4>, Nullable<Varchar>, Varchar, Uuid, Nullable<Uuid>, Nullable<Uuid>, Nullable<Uuid>, Nullable<Uuid>, Uuid, Varchar, Jsonb, Nullable<Jsonb>, Nullable<Varchar>)> = BoxedSelectStatement<'a, ST, table, DB>;
Expand description

Helper type for representing a boxed query from this table

Aliased Type§

struct BoxedQuery<'a, DB, ST = (Uuid, Nullable<Timestamp>, Nullable<Uuid>, Nullable<Int4>, Nullable<Varchar>, Varchar, Uuid, Nullable<Uuid>, Nullable<Uuid>, Nullable<Uuid>, Nullable<Uuid>, Uuid, Varchar, Jsonb, Nullable<Jsonb>, Nullable<Varchar>)> { /* private fields */ }

Implementations

Source§

impl<'a, ST, QS, DB> BoxedSelectStatement<'a, ST, QS, DB>

Source

pub fn new( select: Box<dyn QueryFragment<DB> + 'a>, from: QS, distinct: Box<dyn QueryFragment<DB> + 'a>, where_clause: BoxedWhereClause<'a, DB>, order: Option<Box<dyn QueryFragment<DB> + 'a>>, limit: Box<dyn QueryFragment<DB> + 'a>, offset: Box<dyn QueryFragment<DB> + 'a>, group_by: Box<dyn QueryFragment<DB> + 'a>, ) -> BoxedSelectStatement<'a, ST, QS, DB>

Trait Implementations

Source§

impl<'a, ST, QS, DB> DistinctDsl for BoxedSelectStatement<'a, ST, QS, DB>

Source§

type Output = BoxedSelectStatement<'a, ST, QS, DB>

The type returned by .distinct
Source§

fn distinct( self, ) -> <BoxedSelectStatement<'a, ST, QS, DB> as DistinctDsl>::Output

See the trait documentation.
Source§

impl<'a, ST, QS, DB, Predicate> FilterDsl<Predicate> for BoxedSelectStatement<'a, ST, QS, DB>
where BoxedWhereClause<'a, DB>: WhereAnd<Predicate, Output = BoxedWhereClause<'a, DB>>, Predicate: AppearsOnTable<QS, SqlType = Bool> + NonAggregate,

Source§

type Output = BoxedSelectStatement<'a, ST, QS, DB>

The type returned by .filter.
Source§

fn filter( self, predicate: Predicate, ) -> <BoxedSelectStatement<'a, ST, QS, DB> as FilterDsl<Predicate>>::Output

See the trait documentation.
Source§

impl<'a, ST, QS, DB, Expr> GroupByDsl<Expr> for BoxedSelectStatement<'a, ST, QS, DB>
where DB: Backend, Expr: QueryFragment<DB> + AppearsOnTable<QS> + 'a, BoxedSelectStatement<'a, ST, QS, DB>: Query,

Source§

type Output = BoxedSelectStatement<'a, ST, QS, DB>

The type returned by .group_by
Source§

fn group_by( self, group_by: Expr, ) -> <BoxedSelectStatement<'a, ST, QS, DB> as GroupByDsl<Expr>>::Output

See the trait documentation.
Source§

impl<'a, ST, QS, DB, T> Insertable<T> for BoxedSelectStatement<'a, ST, QS, DB>
where T: Table, BoxedSelectStatement<'a, ST, QS, DB>: Query,

Source§

type Values = InsertFromSelect<BoxedSelectStatement<'a, ST, QS, DB>, <T as Table>::AllColumns>

The VALUES clause to insert these records Read more
Source§

fn values( self, ) -> <BoxedSelectStatement<'a, ST, QS, DB> as Insertable<T>>::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
Source§

impl<'a, ST, QS, DB> LimitDsl for BoxedSelectStatement<'a, ST, QS, DB>

Source§

type Output = BoxedSelectStatement<'a, ST, QS, DB>

The type returned by .limit
Source§

fn limit( self, limit: i64, ) -> <BoxedSelectStatement<'a, ST, QS, DB> as LimitDsl>::Output

See the trait documentation
Source§

impl<'a, ST, QS, DB> OffsetDsl for BoxedSelectStatement<'a, ST, QS, DB>

Source§

type Output = BoxedSelectStatement<'a, ST, QS, DB>

The type returned by .offset.
Source§

fn offset( self, offset: i64, ) -> <BoxedSelectStatement<'a, ST, QS, DB> as OffsetDsl>::Output

See the trait documentation
Source§

impl<'a, ST, QS, DB, Predicate> OrFilterDsl<Predicate> for BoxedSelectStatement<'a, ST, QS, DB>
where BoxedWhereClause<'a, DB>: WhereOr<Predicate, Output = BoxedWhereClause<'a, DB>>, Predicate: AppearsOnTable<QS, SqlType = Bool> + NonAggregate,

Source§

type Output = BoxedSelectStatement<'a, ST, QS, DB>

The type returned by .filter.
Source§

fn or_filter( self, predicate: Predicate, ) -> <BoxedSelectStatement<'a, ST, QS, DB> as OrFilterDsl<Predicate>>::Output

See the trait documentation.
Source§

impl<'a, ST, QS, DB, Order> OrderDsl<Order> for BoxedSelectStatement<'a, ST, QS, DB>
where DB: Backend, Order: QueryFragment<DB> + AppearsOnTable<QS> + 'a,

Source§

type Output = BoxedSelectStatement<'a, ST, QS, DB>

The type returned by .order.
Source§

fn order( self, order: Order, ) -> <BoxedSelectStatement<'a, ST, QS, DB> as OrderDsl<Order>>::Output

See the trait documentation.
Source§

impl<'a, ST, QS, DB> Query for BoxedSelectStatement<'a, ST, QS, DB>
where DB: Backend,

Source§

type SqlType = ST

The SQL type that this query represents. Read more
Source§

impl<'a, ST, QS, DB> QueryDsl for BoxedSelectStatement<'a, ST, QS, DB>

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<'a, ST, QS, DB> QueryFragment<DB> for BoxedSelectStatement<'a, ST, QS, DB>
where DB: Backend, QS: QuerySource, <QS as QuerySource>::FromClause: QueryFragment<DB>,

Source§

fn walk_ast(&self, out: AstPass<'_, DB>) -> Result<(), Error>

Walk over this QueryFragment for all passes. Read more
Source§

fn to_sql(&self, out: &mut <DB as Backend>::QueryBuilder) -> Result<(), Error>

Converts this QueryFragment to its SQL representation. Read more
Source§

fn collect_binds( &self, out: &mut <DB as Backend>::BindCollector, metadata_lookup: &<DB as TypeMetadata>::MetadataLookup, ) -> Result<(), Error>

Serializes all bind parameters in this query. Read more
Source§

fn is_safe_to_cache_prepared(&self) -> Result<bool, Error>

Is this query safe to store in the prepared statement cache? Read more
Source§

impl<'a, ST, QS, DB> QueryId for BoxedSelectStatement<'a, ST, QS, DB>

Source§

const HAS_STATIC_QUERY_ID: bool = false

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

type QueryId = ()

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

impl<'a, ST, QS, DB, Conn> RunQueryDsl<Conn> for BoxedSelectStatement<'a, ST, QS, DB>

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<'a, ST, QS, DB, Selection> SelectDsl<Selection> for BoxedSelectStatement<'a, ST, QS, DB>
where DB: Backend, Selection: SelectableExpression<QS> + QueryFragment<DB> + 'a,

Source§

type Output = BoxedSelectStatement<'a, <Selection as Expression>::SqlType, QS, DB>

The type returned by .select
Source§

fn select( self, selection: Selection, ) -> <BoxedSelectStatement<'a, ST, QS, DB> as SelectDsl<Selection>>::Output

See the trait documentation
Source§

impl<'a, ST, QS, DB> SelectNullableDsl for BoxedSelectStatement<'a, ST, QS, DB>
where ST: NotNull,

Source§

type Output = BoxedSelectStatement<'a, Nullable<ST>, QS, DB>

The return type of nullable
Source§

fn nullable( self, ) -> <BoxedSelectStatement<'a, ST, QS, DB> as SelectNullableDsl>::Output

See the trait documentation
Source§

impl<'a, ST, QS, DB> SelectQuery for BoxedSelectStatement<'a, ST, QS, DB>
where DB: Backend,

Source§

type SqlType = ST

The SQL type of the SELECT clause
Source§

impl<'a, ST, QS, DB, Order> ThenOrderDsl<Order> for BoxedSelectStatement<'a, ST, QS, DB>
where DB: Backend + 'a, Order: QueryFragment<DB> + AppearsOnTable<QS> + 'a,

Source§

type Output = BoxedSelectStatement<'a, ST, QS, DB>

The type returned by .then_order_by.
Source§

fn then_order_by( self, order: Order, ) -> <BoxedSelectStatement<'a, ST, QS, DB> as ThenOrderDsl<Order>>::Output

See the trait documentation.
Source§

impl<'a, ST, QS, DB, Rhs> JoinTo<Rhs> for BoxedSelectStatement<'a, ST, QS, DB>
where QS: JoinTo<Rhs>,