Struct butane::query::Query[][src]

pub struct Query<T> where
    T: DataResult
{ /* fields omitted */ }
Expand description

Representation of a database query.

Implementations

Creates a query which matches all objects in table. The set of matched objects can be restricted with filter and limit.

Restricts the query to matching only objects for which expr is true. Returns self as this method is expected to be chained.

Limits the query to matching the first lim objects. Returns self as this method is expected to be chained.

Order the query results by the given column. Multiple calls to this method may be made, with earlier calls taking precedence. It is recommended to use the colname! macro to construct the column name in a typesafe manner.

Shorthand for order(column, OrderDirection::Ascending)

Shorthand for order(column, OrderDirection::Descending)

Executes the query against conn and returns the first result (if any).

Executes the query against conn.

Executes the query against conn and deletes all matching objects.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

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

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

recently added

Uses borrowed data to replace owned data, usually by cloning. 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.