pub struct Query(/* private fields */);Expand description
Represents a generic query to find ents within some database
Implementations§
Source§impl Query
impl Query
Sourcepub fn chain(self, filter: Filter) -> Self
pub fn chain(self, filter: Filter) -> Self
Consumes query, producing a new query with the additional filter added to the end of the filters to be applied
Sourcepub fn add_filter(&mut self, filter: Filter) -> &mut Self
pub fn add_filter(&mut self, filter: Filter) -> &mut Self
Updates the query by adding an additional filter to the end
pub fn where_id<P: Into<TypedPredicate<Id>>>(self, p: P) -> Self
pub fn where_type<P: Into<TypedPredicate<String>>>(self, p: P) -> Self
pub fn where_created<P: Into<TypedPredicate<u64>>>(self, p: P) -> Self
pub fn where_last_updated<P: Into<TypedPredicate<u64>>>(self, p: P) -> Self
pub fn where_field<S: Into<String>, P: Into<Predicate>>( self, name: S, p: P, ) -> Self
pub fn where_edge<S: Into<String>, F: Into<Filter>>( self, name: S, filter: F, ) -> Self
pub fn where_into_edge<S: Into<String>>(self, name: S) -> Self
Trait Implementations§
Source§impl EntQuery for Query
impl EntQuery for Query
type Output = Vec<Box<dyn Ent>>
Source§fn execute_with_db(self, db: WeakDatabaseRc) -> DatabaseResult<Self::Output>
fn execute_with_db(self, db: WeakDatabaseRc) -> DatabaseResult<Self::Output>
Executes the query against the provided database, returning the query’s
output as the result
Source§fn execute(self) -> DatabaseResult<Self::Output>
fn execute(self) -> DatabaseResult<Self::Output>
Executes the query against the global database, returning the query’s
output as the result
Source§impl Extend<Filter> for Query
impl Extend<Filter> for Query
Source§fn extend<T: IntoIterator<Item = Filter>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Filter>>(&mut self, iter: T)
Extends the query’s filters with the contents of the iterator
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl IntoIterator for Query
impl IntoIterator for Query
Auto Trait Implementations§
impl Freeze for Query
impl !RefUnwindSafe for Query
impl !Send for Query
impl !Sync for Query
impl Unpin for Query
impl !UnwindSafe for Query
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