pub struct OperationAssetSelect<'conn> { /* private fields */ }Implementations§
Source§impl<'conn> OperationAssetSelect<'conn>
impl<'conn> OperationAssetSelect<'conn>
pub const LogId: SelectField<OperationAsset, HashId, HashId>
pub const AssetRefId: SelectField<OperationAsset, HashId, HashId>
pub const Role: SelectField<OperationAsset, AssetRole, AssetRole>
pub fn new(conn: &'conn Connection) -> Self
pub fn with_ref<R, K>(self, history_ref: R) -> Selfwhere
R: IntoHistoryRef<K>,
pub fn log_id(self, value: HashId) -> Self
pub fn log_id_in<I>(self, values: I) -> Selfwhere
I: IntoIterator<Item = HashId>,
pub fn asset_ref_id(self, value: HashId) -> Self
pub fn asset_ref_id_in<I>(self, values: I) -> Selfwhere
I: IntoIterator<Item = HashId>,
pub fn role(self, value: AssetRole) -> Self
pub fn role_in<I>(self, values: I) -> Selfwhere
I: IntoIterator<Item = AssetRole>,
pub fn order_by<T, JoinType>( self, field: SelectField<OperationAsset, T, JoinType>, direction: Direction, ) -> Self
Sourcepub fn order_by_relevance<T>(
self,
field: SelectField<OperationAsset, T, String>,
search: impl Into<String>,
) -> Self
pub fn order_by_relevance<T>( self, field: SelectField<OperationAsset, T, String>, search: impl Into<String>, ) -> Self
Orders by exact match, case-insensitive exact match, LIKE prefix, then LIKE contains.
Search values are bound parameters; % and _ retain LIKE wildcard semantics.
Case-insensitive equality uses SQL lower (ASCII by default); LIKE follows the
connection’s settings. Case-sensitive equality has the highest priority.
Unmatched rows, including NULL, rank last. Add a _like filter to exclude them,
and chain order_by for deterministic ties. Ordering runs before pagination.
pub fn join_on<SourceType, JoinedModel, JoinedType, JoinType>(
self,
source_field: SelectField<OperationAsset, SourceType, JoinType>,
joined_field: SelectField<JoinedModel, JoinedType, JoinType>,
) -> Selfwhere
JoinedModel: ModelSelectSource,
pub fn join_filtered_on<SourceType, JoinedModel, JoinedType, JoinType>(
self,
source_field: SelectField<OperationAsset, SourceType, JoinType>,
joined_field: SelectField<JoinedModel, JoinedType, JoinType>,
joined: <JoinedModel as ModelSelectSource>::Selector<'conn>,
) -> Selfwhere
JoinedModel: ModelSelectSource,
pub fn only<P>(self, projection: P) -> SelectedFields<Self, P>where
P: SelectProjection,
pub fn models<P>(self) -> SelectedModels<Self, P>where
P: ModelProjection,
pub fn limit(self, limit: u32) -> Self
pub fn offset(self, offset: u32) -> Self
pub fn load(self) -> Result<Vec<OperationAsset>, ModelSelectError>
pub fn get(self) -> Result<Option<OperationAsset>, ModelSelectError>
pub fn get_by_id( self, id: (HashId, HashId, AssetRole), ) -> Result<Option<OperationAsset>, ModelSelectError>
pub fn query_by_ids<I>( self, ids: I, ) -> Result<Vec<OperationAsset>, ModelSelectError>
pub fn delete_by_ids<I>(self, ids: I) -> Result<usize, ModelSelectError>
Trait Implementations§
Source§impl<'conn> Clone for OperationAssetSelect<'conn>
impl<'conn> Clone for OperationAssetSelect<'conn>
Auto Trait Implementations§
impl<'conn> !RefUnwindSafe for OperationAssetSelect<'conn>
impl<'conn> !Send for OperationAssetSelect<'conn>
impl<'conn> !Sync for OperationAssetSelect<'conn>
impl<'conn> !UnwindSafe for OperationAssetSelect<'conn>
impl<'conn> Freeze for OperationAssetSelect<'conn>
impl<'conn> Unpin for OperationAssetSelect<'conn>
impl<'conn> UnsafeUnpin for OperationAssetSelect<'conn>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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