pub trait TrashedQuery {
// Required methods
fn without_trashed(self) -> Self;
fn only_trashed(self) -> Self;
}Expand description
Trash filters for any query on a SoftDelete entity.
use sea_orm::{ColumnTrait, DatabaseConnection, DbErr, EntityTrait, QueryFilter};
use sea_orm_soft_delete::TrashedQuery;
async fn example(db: &DatabaseConnection) -> Result<(), DbErr> {
let posts = posts::Entity::find()
.filter(posts::Column::CategoryId.eq(1))
.without_trashed()
.all(db)
.await?;
Ok(())
}There is no with_trashed(): a plain query already includes trashed rows.
Required Methods§
Sourcefn without_trashed(self) -> Self
fn without_trashed(self) -> Self
Keeps only rows that are not in the trash.
Sourcefn only_trashed(self) -> Self
fn only_trashed(self) -> Self
Keeps only rows that are in the trash.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".