pub struct QueryResult { /* private fields */ }Expand description
Defines the result of a query operation on a Model
Implementationsยง
Sourceยงimpl QueryResult
impl QueryResult
Sourcepub fn try_get_by<T, I>(&self, index: I) -> Result<T, DbErr>where
T: TryGetable,
I: ColIdx,
pub fn try_get_by<T, I>(&self, index: I) -> Result<T, DbErr>where
T: TryGetable,
I: ColIdx,
Get a value from the query result with an ColIdx
Sourcepub fn try_get_by_nullable<T, I>(&self, index: I) -> Result<T, TryGetError>where
T: TryGetable,
I: ColIdx,
pub fn try_get_by_nullable<T, I>(&self, index: I) -> Result<T, TryGetError>where
T: TryGetable,
I: ColIdx,
Get a value from the query result with an ColIdx
Sourcepub fn try_get<T>(&self, pre: &str, col: &str) -> Result<T, DbErr>where
T: TryGetable,
pub fn try_get<T>(&self, pre: &str, col: &str) -> Result<T, DbErr>where
T: TryGetable,
Get a value from the query result with prefixed column name
Sourcepub fn try_get_nullable<T>(
&self,
pre: &str,
col: &str,
) -> Result<T, TryGetError>where
T: TryGetable,
pub fn try_get_nullable<T>(
&self,
pre: &str,
col: &str,
) -> Result<T, TryGetError>where
T: TryGetable,
Get a value from the query result with prefixed column name
Sourcepub fn try_get_by_index<T>(&self, idx: usize) -> Result<T, DbErr>where
T: TryGetable,
pub fn try_get_by_index<T>(&self, idx: usize) -> Result<T, DbErr>where
T: TryGetable,
Get a value from the query result based on the order in the select expressions
Sourcepub fn try_get_by_index_nullable<T>(&self, idx: usize) -> Result<T, TryGetError>where
T: TryGetable,
pub fn try_get_by_index_nullable<T>(&self, idx: usize) -> Result<T, TryGetError>where
T: TryGetable,
Get a value from the query result based on the order in the select expressions
Sourcepub fn try_get_many<T>(&self, pre: &str, cols: &[String]) -> Result<T, DbErr>where
T: TryGetableMany,
pub fn try_get_many<T>(&self, pre: &str, cols: &[String]) -> Result<T, DbErr>where
T: TryGetableMany,
Get a tuple value from the query result with prefixed column name
Sourcepub fn try_get_many_by_index<T>(&self) -> Result<T, DbErr>where
T: TryGetableMany,
pub fn try_get_many_by_index<T>(&self) -> Result<T, DbErr>where
T: TryGetableMany,
Get a tuple value from the query result based on the order in the select expressions
Sourcepub fn column_names(&self) -> Vec<String>
pub fn column_names(&self) -> Vec<String>
Retrieves the names of the columns in the result set
Sourcepub fn try_as_mock_row(&self) -> Option<&MockRow>
Available on crate feature mock only.
pub fn try_as_mock_row(&self) -> Option<&MockRow>
mock only.Access the underlying MockRow if we use a mock.
Sourcepub fn try_as_proxy_row(&self) -> Option<&ProxyRow>
Available on crate feature proxy only.
pub fn try_as_proxy_row(&self) -> Option<&ProxyRow>
proxy only.Access the underlying ProxyRow if we use a proxy.
Trait Implementationsยง
Sourceยงimpl Debug for QueryResult
impl Debug for QueryResult
Auto Trait Implementationsยง
impl Freeze for QueryResult
impl RefUnwindSafe for QueryResult
impl Send for QueryResult
impl Sync for QueryResult
impl Unpin for QueryResult
impl UnwindSafe for QueryResult
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> 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