pub trait Modifiable: Sized {
// Required method
fn parts_mut(&mut self) -> &mut SqlParts;
// Provided methods
fn order(self, column: &str, direction: OrderDirection) -> Self { ... }
fn order_with_nulls(
self,
column: &str,
direction: OrderDirection,
nulls: NullsPosition,
) -> Self { ... }
fn limit(self, count: i64) -> Self { ... }
fn range(self, from: i64, to: i64) -> Self { ... }
fn single(self) -> Self { ... }
fn maybe_single(self) -> Self { ... }
fn count(self) -> Self { ... }
fn count_option(self, option: CountOption) -> Self { ... }
}Expand description
Trait providing modifier methods (order, limit, range, single, count).
Required Methods§
Provided Methods§
Sourcefn order(self, column: &str, direction: OrderDirection) -> Self
fn order(self, column: &str, direction: OrderDirection) -> Self
Order by a column.
Sourcefn order_with_nulls(
self,
column: &str,
direction: OrderDirection,
nulls: NullsPosition,
) -> Self
fn order_with_nulls( self, column: &str, direction: OrderDirection, nulls: NullsPosition, ) -> Self
Order by a column with explicit nulls positioning.
Sourcefn range(self, from: i64, to: i64) -> Self
fn range(self, from: i64, to: i64) -> Self
Set the range of rows to return (offset..offset+limit).
Sourcefn maybe_single(self) -> Self
fn maybe_single(self) -> Self
Expect zero or one row. Returns error if >1 rows.
Sourcefn count_option(self, option: CountOption) -> Self
fn count_option(self, option: CountOption) -> Self
Request a row count with a specific counting strategy.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.