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_mysql_row(&self) -> Option<&MySqlRow>
pub fn try_as_mysql_row(&self) -> Option<&MySqlRow>
Access the underlying MySqlRow if we use the MySQL backend.
pub fn try_as_pg_row(&self) -> Option<&PgRow>
pub fn try_as_pg_row(&self) -> Option<&PgRow>
Access the underlying PgRow if we use the Postgres backend.
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.
pub fn try_as_mock_row(&self) -> Option<&MockRow>
pub fn try_as_mock_row(&self) -> Option<&MockRow>
Access the underlying MockRow if we use a mock.
pub fn try_as_proxy_row(&self) -> Option<&ProxyRow>
pub fn try_as_proxy_row(&self) -> Option<&ProxyRow>
Access the underlying ProxyRow if we use a proxy.
Trait Implementations§
§impl Debug for QueryResult
impl Debug for QueryResult
§impl From<MsSqlRow> for QueryResult
impl From<MsSqlRow> for QueryResult
§fn from(row: MsSqlRow) -> QueryResult
fn from(row: MsSqlRow) -> QueryResult
§impl From<MySqlRow> for QueryResult
impl From<MySqlRow> for QueryResult
§fn from(row: MySqlRow) -> QueryResult
fn from(row: MySqlRow) -> QueryResult
§impl From<PgRow> for QueryResult
impl From<PgRow> for QueryResult
§fn from(row: PgRow) -> QueryResult
fn from(row: PgRow) -> QueryResult
§impl From<ProxyRow> for QueryResult
impl From<ProxyRow> for QueryResult
§impl From<SqliteRow> for QueryResult
impl From<SqliteRow> for QueryResult
§fn from(row: SqliteRow) -> QueryResult
fn from(row: SqliteRow) -> 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
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>
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>
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