Struct QueryResult
pub struct QueryResult { /* private fields */ }
Expand description
Defines the result of a query operation on a Model
Implementations§
§impl QueryResult
impl QueryResult
pub 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
pub 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
pub 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
pub 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
pub 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
pub 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
pub 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
pub 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
pub fn column_names(&self) -> Vec<String>
pub fn column_names(&self) -> Vec<String>
Retrieves the names of the columns in the result set
pub fn try_as_sqlite_row(&self) -> Option<&SqliteRow>
pub fn try_as_sqlite_row(&self) -> Option<&SqliteRow>
Access the underlying SqliteRow
if we use the SQLite backend.
Trait Implementations§
§impl Debug for QueryResult
impl Debug for QueryResult
§impl From<SqliteRow> for QueryResult
impl From<SqliteRow> for QueryResult
§fn from(row: SqliteRow) -> QueryResult
fn from(row: SqliteRow) -> QueryResult
Converts to this type from the input type.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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