pub trait Queryable: Connection {
Show 16 methods
// Provided methods
fn query<T: FromRow>(&self, sql: &str) -> Result<Vec<T>, MappingError> { ... }
fn query_with<T: FromRow>(
&self,
sql: &str,
params: &Parameters,
) -> Result<Vec<T>, MappingError> { ... }
fn query_first<T: FromRow>(&self, sql: &str) -> Result<T, MappingError> { ... }
fn query_first_with<T: FromRow>(
&self,
sql: &str,
params: &Parameters,
) -> Result<T, MappingError> { ... }
fn query_first_or_default<T: FromRow>(
&self,
sql: &str,
) -> Result<Option<T>, MappingError> { ... }
fn query_first_or_default_with<T: FromRow>(
&self,
sql: &str,
params: &Parameters,
) -> Result<Option<T>, MappingError> { ... }
fn query_single<T: FromRow>(&self, sql: &str) -> Result<T, MappingError> { ... }
fn query_single_with<T: FromRow>(
&self,
sql: &str,
params: &Parameters,
) -> Result<T, MappingError> { ... }
fn query_single_or_default<T: FromRow>(
&self,
sql: &str,
) -> Result<Option<T>, MappingError> { ... }
fn query_single_or_default_with<T: FromRow>(
&self,
sql: &str,
params: &Parameters,
) -> Result<Option<T>, MappingError> { ... }
fn query_multiple(&self, sql: &str) -> Result<GridReader, MappingError> { ... }
fn query_multiple_with(
&self,
sql: &str,
params: &Parameters,
) -> Result<GridReader, MappingError> { ... }
fn query_scalar<T: FromColumnScalar>(
&self,
sql: &str,
) -> Result<T, MappingError> { ... }
fn query_scalar_with<T: FromColumnScalar>(
&self,
sql: &str,
params: &Parameters,
) -> Result<T, MappingError> { ... }
fn query_multi_map<T1: FromRow, T2: FromRow, R>(
&self,
sql: &str,
split_on: &str,
combine: impl Fn(T1, T2) -> R,
) -> Result<Vec<R>, MappingError> { ... }
fn query_multi_map_with<T1: FromRow, T2: FromRow, R>(
&self,
sql: &str,
params: &Parameters,
split_on: &str,
combine: impl Fn(T1, T2) -> R,
) -> Result<Vec<R>, MappingError> { ... }
}Provided Methods§
fn query<T: FromRow>(&self, sql: &str) -> Result<Vec<T>, MappingError>
fn query_with<T: FromRow>( &self, sql: &str, params: &Parameters, ) -> Result<Vec<T>, MappingError>
fn query_first<T: FromRow>(&self, sql: &str) -> Result<T, MappingError>
fn query_first_with<T: FromRow>( &self, sql: &str, params: &Parameters, ) -> Result<T, MappingError>
fn query_first_or_default<T: FromRow>( &self, sql: &str, ) -> Result<Option<T>, MappingError>
fn query_first_or_default_with<T: FromRow>( &self, sql: &str, params: &Parameters, ) -> Result<Option<T>, MappingError>
fn query_single<T: FromRow>(&self, sql: &str) -> Result<T, MappingError>
fn query_single_with<T: FromRow>( &self, sql: &str, params: &Parameters, ) -> Result<T, MappingError>
fn query_single_or_default<T: FromRow>( &self, sql: &str, ) -> Result<Option<T>, MappingError>
fn query_single_or_default_with<T: FromRow>( &self, sql: &str, params: &Parameters, ) -> Result<Option<T>, MappingError>
fn query_multiple(&self, sql: &str) -> Result<GridReader, MappingError>
fn query_multiple_with( &self, sql: &str, params: &Parameters, ) -> Result<GridReader, MappingError>
fn query_scalar<T: FromColumnScalar>( &self, sql: &str, ) -> Result<T, MappingError>
fn query_scalar_with<T: FromColumnScalar>( &self, sql: &str, params: &Parameters, ) -> Result<T, MappingError>
fn query_multi_map<T1: FromRow, T2: FromRow, R>( &self, sql: &str, split_on: &str, combine: impl Fn(T1, T2) -> R, ) -> Result<Vec<R>, MappingError>
fn query_multi_map_with<T1: FromRow, T2: FromRow, R>( &self, sql: &str, params: &Parameters, split_on: &str, combine: impl Fn(T1, T2) -> R, ) -> Result<Vec<R>, MappingError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".