Skip to main content

AssetRefSelect

Struct AssetRefSelect 

Source
pub struct AssetRefSelect<'conn> { /* private fields */ }

Implementations§

Source§

impl<'conn> AssetRefSelect<'conn>

Source

pub const Id: SelectField<AssetRef, HashId, HashId>

Source

pub const Uri: SelectField<AssetRef, String, String>

Source

pub const FileType: SelectField<AssetRef, String, String>

Source

pub const Checksum: SelectField<AssetRef, Option<Sha256Hash>, Sha256Hash>

Source

pub const Size: SelectField<AssetRef, Option<i64>, i64>

Source

pub const Role: SelectField<AssetRef, AssetRole, AssetRole>

Source

pub const LogicalPath: SelectField<AssetRef, Option<String>, String>

Source

pub const Name: SelectField<AssetRef, Option<String>, String>

Source

pub const CreatedOn: SelectField<AssetRef, i64, i64>

Source

pub const UpstreamAssetRefId: SelectField<AssetRef, Option<HashId>, HashId>

Source

pub const MaterializedChecksum: SelectField<AssetRef, Option<Sha256Hash>, Sha256Hash>

Source

pub fn new(conn: &'conn Connection) -> Self

Source

pub fn with_ref<R, K>(self, history_ref: R) -> Self
where R: IntoHistoryRef<K>,

Source

pub fn id(self, value: HashId) -> Self

Source

pub fn id_in<I>(self, values: I) -> Self
where I: IntoIterator<Item = HashId>,

Source

pub fn uri(self, value: impl Into<String>) -> Self

Source

pub fn uri_in<I, V>(self, values: I) -> Self
where I: IntoIterator<Item = V>, V: Into<String>,

Source

pub fn uri_contains(self, value: impl Into<String>) -> Self

Source

pub fn uri_like(self, pattern: impl Into<String>) -> Self

Matches a bound SQL LIKE pattern, preserving % and _ wildcards. Case sensitivity follows the database connection’s LIKE settings.

Source

pub fn uri_case_insensitive(self, value: impl Into<String>) -> Self

Source

pub fn file_type(self, value: impl Into<String>) -> Self

Source

pub fn file_type_in<I, V>(self, values: I) -> Self
where I: IntoIterator<Item = V>, V: Into<String>,

Source

pub fn file_type_contains(self, value: impl Into<String>) -> Self

Source

pub fn file_type_like(self, pattern: impl Into<String>) -> Self

Matches a bound SQL LIKE pattern, preserving % and _ wildcards. Case sensitivity follows the database connection’s LIKE settings.

Source

pub fn file_type_case_insensitive(self, value: impl Into<String>) -> Self

Source

pub fn checksum(self, value: Sha256Hash) -> Self

Source

pub fn checksum_in<I>(self, values: I) -> Self
where I: IntoIterator<Item = Sha256Hash>,

Source

pub fn checksum_is_null(self) -> Self

Source

pub fn size(self, value: i64) -> Self

Source

pub fn size_in<I>(self, values: I) -> Self
where I: IntoIterator<Item = i64>,

Source

pub fn size_is_null(self) -> Self

Source

pub fn role(self, value: AssetRole) -> Self

Source

pub fn role_in<I>(self, values: I) -> Self
where I: IntoIterator<Item = AssetRole>,

Source

pub fn logical_path(self, value: impl Into<String>) -> Self

Source

pub fn logical_path_in<I, V>(self, values: I) -> Self
where I: IntoIterator<Item = V>, V: Into<String>,

Source

pub fn logical_path_contains(self, value: impl Into<String>) -> Self

Source

pub fn logical_path_like(self, pattern: impl Into<String>) -> Self

Matches a bound SQL LIKE pattern, preserving % and _ wildcards. Case sensitivity follows the database connection’s LIKE settings.

Source

pub fn logical_path_case_insensitive(self, value: impl Into<String>) -> Self

Source

pub fn logical_path_is_null(self) -> Self

Source

pub fn name(self, value: impl Into<String>) -> Self

Source

pub fn name_in<I, V>(self, values: I) -> Self
where I: IntoIterator<Item = V>, V: Into<String>,

Source

pub fn name_contains(self, value: impl Into<String>) -> Self

Source

pub fn name_like(self, pattern: impl Into<String>) -> Self

Matches a bound SQL LIKE pattern, preserving % and _ wildcards. Case sensitivity follows the database connection’s LIKE settings.

Source

pub fn name_case_insensitive(self, value: impl Into<String>) -> Self

Source

pub fn name_is_null(self) -> Self

Source

pub fn created_on(self, value: i64) -> Self

Source

pub fn created_on_in<I>(self, values: I) -> Self
where I: IntoIterator<Item = i64>,

Source

pub fn upstream_asset_ref_id(self, value: HashId) -> Self

Source

pub fn upstream_asset_ref_id_in<I>(self, values: I) -> Self
where I: IntoIterator<Item = HashId>,

Source

pub fn upstream_asset_ref_id_is_null(self) -> Self

Source

pub fn materialized_checksum(self, value: Sha256Hash) -> Self

Source

pub fn materialized_checksum_in<I>(self, values: I) -> Self
where I: IntoIterator<Item = Sha256Hash>,

Source

pub fn materialized_checksum_is_null(self) -> Self

Source

pub fn order_by<T, JoinType>( self, field: SelectField<AssetRef, T, JoinType>, direction: Direction, ) -> Self

Source

pub fn order_by_relevance<T>( self, field: SelectField<AssetRef, 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.

Source

pub fn join_on<SourceType, JoinedModel, JoinedType, JoinType>( self, source_field: SelectField<AssetRef, SourceType, JoinType>, joined_field: SelectField<JoinedModel, JoinedType, JoinType>, ) -> Self
where JoinedModel: ModelSelectSource,

Source

pub fn join_filtered_on<SourceType, JoinedModel, JoinedType, JoinType>( self, source_field: SelectField<AssetRef, SourceType, JoinType>, joined_field: SelectField<JoinedModel, JoinedType, JoinType>, joined: <JoinedModel as ModelSelectSource>::Selector<'conn>, ) -> Self
where JoinedModel: ModelSelectSource,

Source

pub fn only<P>(self, projection: P) -> SelectedFields<Self, P>
where P: SelectProjection,

Source

pub fn models<P>(self) -> SelectedModels<Self, P>
where P: ModelProjection,

Source

pub fn limit(self, limit: u32) -> Self

Source

pub fn offset(self, offset: u32) -> Self

Source

pub fn load(self) -> Result<Vec<AssetRef>, ModelSelectError>

Source

pub fn get(self) -> Result<Option<AssetRef>, ModelSelectError>

Source

pub fn get_by_id(self, id: HashId) -> Result<Option<AssetRef>, ModelSelectError>

Source

pub fn query_by_ids<I>(self, ids: I) -> Result<Vec<AssetRef>, ModelSelectError>
where I: IntoIterator<Item = HashId>,

Source

pub fn delete_by_ids<I>(self, ids: I) -> Result<usize, ModelSelectError>
where I: IntoIterator<Item = HashId>,

Trait Implementations§

Source§

impl<'conn> Clone for AssetRefSelect<'conn>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'conn> Debug for AssetRefSelect<'conn>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'conn> !RefUnwindSafe for AssetRefSelect<'conn>

§

impl<'conn> !Send for AssetRefSelect<'conn>

§

impl<'conn> !Sync for AssetRefSelect<'conn>

§

impl<'conn> !UnwindSafe for AssetRefSelect<'conn>

§

impl<'conn> Freeze for AssetRefSelect<'conn>

§

impl<'conn> Unpin for AssetRefSelect<'conn>

§

impl<'conn> UnsafeUnpin for AssetRefSelect<'conn>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

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

fn in_current_span(self) -> Instrumented<Self> ⓘ

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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