Struct toql::query::Query[][src]

pub struct Query<M> {
    pub distinct: bool,
    pub aux_params: HashMap<String, SqlArg, RandomState>,
    pub where_predicates: Vec<String, Global>,
    pub where_predicate_params: Vec<SqlArg, Global>,
    pub select_columns: Vec<String, Global>,
    pub join_stmts: Vec<String, Global>,
    pub join_stmt_params: Vec<SqlArg, Global>,
    pub type_marker: PhantomData<M>,
    // some fields omitted
}

Fields

distinct: bool

Select DISTINCT

aux_params: HashMap<String, SqlArg, RandomState>

Aux params used with query

where_predicates: Vec<String, Global>

Additional where clause

where_predicate_params: Vec<SqlArg, Global>

Query params for additional sql restriction

select_columns: Vec<String, Global>

Additional select columns

join_stmts: Vec<String, Global>

Additional joins statements

join_stmt_params: Vec<SqlArg, Global>type_marker: PhantomData<M>

Type marker

Implementations

Create a new empty query.

Create a new query from another query.

Create a new query from another query.

Create a new query from the path of another query.

Create a new query that select all top fields.

Wrap query with parentheses.

Concatenate field or query with AND.

Concatenate field or query with AND.

Concatenate field or query with OR.

Concatenate field or query with AND.

Modifiy the query with an additional stuct.

Convenence method to add aux params

Check if query contains path Example: Path is ‘user_address’ Valid query paths are ‘user_’, ‘user_address_’, ’user_address_country_*,‘user_address_id’

Check if query contains path starting with a subpath Example: Path is ‘user_address’ Valid query paths are ‘user_address_*’, ‘user_address_id’

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Allows to collect different keys in a query (concatenation is or)

Creates a value from an iterator. Read more

Allows to collect different queries in a query (concatenation is and)

Creates a value from an iterator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

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

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

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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