clippy
This commit is contained in:
parent
9fd8b4d32f
commit
626c25614d
@ -412,7 +412,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get one Model from the SELECT query
|
/// Get one Model from the SELECT query
|
||||||
pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr>
|
pub async fn one<C>(self, db: &C) -> Result<Option<E::Model>, DbErr>
|
||||||
where
|
where
|
||||||
C: ConnectionTrait,
|
C: ConnectionTrait,
|
||||||
{
|
{
|
||||||
@ -420,7 +420,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get all Models from the SELECT query
|
/// Get all Models from the SELECT query
|
||||||
pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr>
|
pub async fn all<C>(self, db: &C) -> Result<Vec<E::Model>, DbErr>
|
||||||
where
|
where
|
||||||
C: ConnectionTrait,
|
C: ConnectionTrait,
|
||||||
{
|
{
|
||||||
@ -490,7 +490,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get one Model from the Select query
|
/// Get one Model from the Select query
|
||||||
pub async fn one<'a, C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr>
|
pub async fn one<C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr>
|
||||||
where
|
where
|
||||||
C: ConnectionTrait,
|
C: ConnectionTrait,
|
||||||
{
|
{
|
||||||
@ -498,7 +498,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get all Models from the Select query
|
/// Get all Models from the Select query
|
||||||
pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr>
|
pub async fn all<C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr>
|
||||||
where
|
where
|
||||||
C: ConnectionTrait,
|
C: ConnectionTrait,
|
||||||
{
|
{
|
||||||
@ -600,7 +600,7 @@ where
|
|||||||
/// > then use [`ModelTrait::find_related`] on the model.
|
/// > then use [`ModelTrait::find_related`] on the model.
|
||||||
/// >
|
/// >
|
||||||
/// > See https://www.sea-ql.org/SeaORM/docs/basic-crud/select#lazy-loading for details.
|
/// > See https://www.sea-ql.org/SeaORM/docs/basic-crud/select#lazy-loading for details.
|
||||||
pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Vec<F::Model>)>, DbErr>
|
pub async fn all<C>(self, db: &C) -> Result<Vec<(E::Model, Vec<F::Model>)>, DbErr>
|
||||||
where
|
where
|
||||||
C: ConnectionTrait,
|
C: ConnectionTrait,
|
||||||
{
|
{
|
||||||
@ -667,7 +667,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get an item from the Select query
|
/// Get an item from the Select query
|
||||||
pub async fn one<'a, C>(mut self, db: &C) -> Result<Option<S::Item>, DbErr>
|
pub async fn one<C>(mut self, db: &C) -> Result<Option<S::Item>, DbErr>
|
||||||
where
|
where
|
||||||
C: ConnectionTrait,
|
C: ConnectionTrait,
|
||||||
{
|
{
|
||||||
@ -676,7 +676,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get all items from the Select query
|
/// Get all items from the Select query
|
||||||
pub async fn all<'a, C>(self, db: &C) -> Result<Vec<S::Item>, DbErr>
|
pub async fn all<C>(self, db: &C) -> Result<Vec<S::Item>, DbErr>
|
||||||
where
|
where
|
||||||
C: ConnectionTrait,
|
C: ConnectionTrait,
|
||||||
{
|
{
|
||||||
@ -911,7 +911,7 @@ where
|
|||||||
/// # Ok(())
|
/// # Ok(())
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
pub async fn one<'a, C>(self, db: &C) -> Result<Option<S::Item>, DbErr>
|
pub async fn one<C>(self, db: &C) -> Result<Option<S::Item>, DbErr>
|
||||||
where
|
where
|
||||||
C: ConnectionTrait,
|
C: ConnectionTrait,
|
||||||
{
|
{
|
||||||
@ -962,7 +962,7 @@ where
|
|||||||
/// # Ok(())
|
/// # Ok(())
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
pub async fn all<'a, C>(self, db: &C) -> Result<Vec<S::Item>, DbErr>
|
pub async fn all<C>(self, db: &C) -> Result<Vec<S::Item>, DbErr>
|
||||||
where
|
where
|
||||||
C: ConnectionTrait,
|
C: ConnectionTrait,
|
||||||
{
|
{
|
||||||
|
@ -18,12 +18,12 @@ pub struct UpdateResult {
|
|||||||
pub rows_affected: u64,
|
pub rows_affected: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, A: 'a> UpdateOne<A>
|
impl<A> UpdateOne<A>
|
||||||
where
|
where
|
||||||
A: ActiveModelTrait,
|
A: ActiveModelTrait,
|
||||||
{
|
{
|
||||||
/// Execute an update operation on an ActiveModel
|
/// Execute an update operation on an ActiveModel
|
||||||
pub async fn exec<'b, C>(self, db: &'b C) -> Result<<A::Entity as EntityTrait>::Model, DbErr>
|
pub async fn exec<C>(self, db: &C) -> Result<<A::Entity as EntityTrait>::Model, DbErr>
|
||||||
where
|
where
|
||||||
<A::Entity as EntityTrait>::Model: IntoActiveModel<A>,
|
<A::Entity as EntityTrait>::Model: IntoActiveModel<A>,
|
||||||
C: ConnectionTrait,
|
C: ConnectionTrait,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user