pub struct Query<E: EntityTrait> { /* private fields */ }Implementations§
Source§impl<E> Query<E>
impl<E> Query<E>
pub fn new(select: Select<E>) -> Self
Sourcepub fn into_inner(self) -> Select<E>
pub fn into_inner(self) -> Select<E>
Escape hatch: reach the underlying SeaORM Select for anything the data
layer does not express.
pub fn where_eq<C, V>(self, column: C, value: V) -> Self
pub fn where_ne<C, V>(self, column: C, value: V) -> Self
pub fn where_gt<C, V>(self, column: C, value: V) -> Self
pub fn where_lt<C, V>(self, column: C, value: V) -> Self
pub fn where_in<C, V>( self, column: C, values: impl IntoIterator<Item = V>, ) -> Self
pub fn where_like<C>(self, column: C, pattern: impl Into<String>) -> Selfwhere
C: ColumnRef<E>,
pub fn where_null<C: ColumnRef<E>>(self, column: C) -> Self
pub fn where_not_null<C: ColumnRef<E>>(self, column: C) -> Self
pub fn order_by_asc<C: ColumnRef<E>>(self, column: C) -> Self
pub fn order_by_desc<C: ColumnRef<E>>(self, column: C) -> Self
pub fn limit(self, limit: u64) -> Self
pub fn offset(self, offset: u64) -> Self
pub async fn all(self) -> Result<Vec<E::Model>>
pub async fn first(self) -> Result<Option<E::Model>>
Sourcepub async fn first_or_fail(self) -> Result<E::Model>
pub async fn first_or_fail(self) -> Result<E::Model>
The first row, or a 404 naming the model.
pub async fn count(self) -> Result<u64>
pub async fn exists(self) -> Result<bool>
Auto Trait Implementations§
impl<E> !RefUnwindSafe for Query<E>
impl<E> !UnwindSafe for Query<E>
impl<E> Freeze for Query<E>
impl<E> Send for Query<E>
impl<E> Sync for Query<E>
impl<E> Unpin for Query<E>
impl<E> UnsafeUnpin for Query<E>
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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